I was installing a clean Redmine 3.0 with CRM plugin on a fresh install of Ubuntu Server 14.04LTS. I succeeded with redmine and a minor plugin, but the CRM one has hit me with this:
# bundle install --without development test RAILS_ENV=production
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Warning: this Gemfile contains multiple primary sources. Using `source` more
than once without a block is a security risk, and may result in installing
unexpected gems. To resolve this warning, use a block to indicate which gems
should come from the secondary source. To upgrade this warning to an error, run
`bundle config disable_multisource true`.
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "i18n":
In Gemfile:
rails (= 4.2.0) ruby depends on
actionpack (= 4.2.0) ruby depends on
activesupport (= 4.2.0) ruby depends on
i18n (~> 0.7) ruby
money (~> 5.1.0) ruby depends on
i18n (~> 0.6.0) ruby
I installed i18n 0.6.0 and 0.7.0, didn't fix:
# gem list --local | grep i18n
i18n (0.7.0, 0.6.0)
I tried removing the Gemfile.lock and using bundler (bundle update && bundle install) again, same result.
I have no idea how to proceed with this issue. I know very little of ruby, gems and bundler and searching has failed me. Help, please.
You can't use the CRM plugin from redminecrm.com with Redmine 3 right now.
At the time of writing, the plugin is only compatible to Redmine 2.x. While the plugin will probably get updated by the authors, it is not yet compatible with Redmine 3.0.
Generally, you should not expect plugins to magically continue to work across major version updates. Especially when there was a major update recently, many plugins will not yet be compatible to the new Redmine version. If you need the plugins, you might be able to use an older version, e.g. Redmine 2.6, until all the plugins you need are updated.
You always have to check if a plugin is compatible to the Redmine version you intend to use.
Related
I used to work in a project with a Ubuntu machine flawlessly.
After some time, I decided to hop into Fedora and now that I've setup everything, I was going to continue the project but when I run bundle install I get the following:
➜ bundle install
Following files may not be writable, so sudo is needed:
/usr/bin
/usr/share/gems
/usr/share/gems/build_info
/usr/share/gems/bundler
/usr/share/gems/cache
/usr/share/gems/doc
/usr/share/gems/extensions
/usr/share/gems/gems
/usr/share/gems/plugins
/usr/share/gems/specifications
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies....
ruby_dep-1.5.0 requires ruby version >= 2.2.5, ~> 2.2, which is incompatible with the current version, ruby 3.0.1p64
Clearly my Ruby version requirement is met.
Should I downgrade it so I could continue?
If so, how to properly do it without rvm or rbenv?
I was able to find 2 lines with ruby_dep on Gemfile.lock and I'm not quite sure how to proceed. The first result is nested and the other isn't:
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
...
ruby_dep (1.5.0)
Should I keep one or change the version of both? I couldn't find ruby_dep anywhere else besides Gemfile.lock
I ran into the same issue.
One method is to delete your Gemfile.lock and run bundle install
This deletes all existing references to ruby_dep and gives you a fresh install of your gems.
Deleting the whole Gemfile.lock file (as suggested in another answer) might not be the best idea.
First, simply try to update the ruby_dep in your dependencies:
bundle update ruby_dep
When it says it requires sudo to install gems, it's because you're using the system Ruby (Ruby that your OS uses), and it's not a good idea to alter that.
Install a different version of Ruby and confirm it's set to that, then bundle.
Step-by-step
Add webrick gem to gemfile
Remove specific jekyll version number from gemfile. Leave only gem "jekyll"
Run bundler
Run bundle exec jekyll serve --livereload
Pay attention to ~> 2.2, it means 2.x, but not 3. Read more here https://bundler.io/gemfile.html
I've just started working on a very old legacy app for a client, which is running on Ruby 1.9.3, Rails 3.2, and using JRuby on the production server. (Obstacles in upgrading the server has been a contributor to remaining on 1.9.3.)
Adding a gem to the Gemfile, even though the gem is compatible with 1.9.3, and even though I've added
ruby '1.9.3', :patchlevel => '551'
to the top of the Gemfile, Bundler continually chooses versions of other gems that require Ruby 2.0, and so updating fails. How can I get around this, without having to manually specify every single gem version that it fails on.
For example:
...
Using quiet_assets 1.1.0
Using rails 3.2.22
Using ref 2.0.0
Using rspec-rails 2.14.2
Fetching rspec_junit_formatter 0.3.0 (was 0.2.3)
Installing rspec_junit_formatter 0.3.0 (was 0.2.3)
Gem::InstallError: rspec_junit_formatter requires Ruby version >= 2.0.0.
An error occurred while installing rspec_junit_formatter (0.3.0), and Bundler cannot continue.
Make sure that `gem install rspec_junit_formatter -v '0.3.0'` succeeds before bundling.
I had to specify gem 'rspec_junit_formatter', '0.2.3', as well as all of the previous failures, in order to get this working. But that seems to defeat the purpose of Bundler. Why is Bundler ignoring Ruby versions when it builds its dependency graph, even though I've explicitly told it what version of Ruby to use?
Bundler is not ignoring the ruby version. When it installs gems it does not look at each gem and do a smart pick of which one to choose to get rid of any dependency issues (including the ruby version dependency).
In your gemfile, by not specifying the gem version, bundler will try to install the highest version it can. This is why it is good practice to specify exact versions for all your gems- so that if an update comes out for a gem in the repo you are getting the gem from- your project does not break.
Specifying the ruby version in the gem file is just like specifying the gem version for particular gem- it installs that version but does not affect the installation of any other gems.
I have an ROR application from which I am trying to execute vagrant up command in the following way system("vagrant up")
I am getting the below error
Vagrant experienced a version conflict with some installed plugins!
This usually happens if you recently upgraded Vagrant. As part of the
upgrade process, some existing plugins are no longer compatible with
this version of Vagrant. The recommended way to fix this is to remove
your existing plugins and reinstall them one-by-one. To remove all
plugins:
rm -r ~/.vagrant.d/plugins.json ~/.vagrant.d/gems
Note if you have an alternate VAGRANT_HOME environmental variable
set, the folders above will be in that directory rather than your
user's home directory.
The error message is shown below:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
vagrant (= 1.7.2) x86-mingw32 depends on
bundler (< 1.8.0, >= 1.5.2) x86-mingw32
Current Bundler version:
bundler (1.10.0.pre.2)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (< 1.8.0, >= 1.5.2) x86-mingw32', which is required by gem 'vagrant (= 1.7.2) x86-mingw32', in any of the sources.
I have tried to do gem install bundler , it always installs bundler 1.9.9
If i try to execute vagrant up from command line it works fine
Below are the versions which I am using
ruby -> 2.1.6p336 (2015-04-13 revision 50298) [x64-mingw32]
Vagrant -> 1.7.2
Rails -> 4.2.1
Any sort of help is much appreciated
I'm new to Rails, following Michael Hartl's textbook. When I run $ bundle install I get the following error:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.1) ruby depends on
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.7.6)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
I then try $ gem install bundler which works fine:
Successfully installed bundler-1.7.6
Parsing documentation for bundler-1.7.6
1 gem installed
However, this doesn't solve the problem. I'm sensing this has something to do with version problems, but I'm not sure where to go with it...
The following :
In Gemfile:
rails (= 3.0.1) ruby depends on
bundler (~> 1.0.0) ruby
means the version of bundler required is greater than or equal to 1.0.0 but strictly less than 1.1.0. Rails 3 is depending on an old version of bundler. At this point of time, you should try out Rails 4 instead :)
You may read up more about the "version syntax" in http://guides.rubygems.org/patterns/#pessimistic_version_constraint
As #user3927334 has already stated the error you got is due to a version conflict between bundler and rails.
Most likely you have run rails new my_app with an outdated version of the rails gem.
gem install rails -v 4.2.0.beta4
Can be used to install a particular version of Rails. see Installing Rails.
You should then remove your old app and rerun the app generator:
rails _4.2.0.beta4_ new hello_app
If you indent to develop on your local machine I would recommend installing RVM (Ruby Version Manager) (as did previous versions of MH's Ruby on Rails Tutorial.)
It allows you to effortlessly switch between different versions of ruby and different sets of gems.
When I run rails new [application] on Ubuntu 13.10, I get the following error:
Resolving dependencies...
Could not find gem 'coffee-rails (~> 3.2.1) ruby' in the gems available on this machine.
It looks like I have this gem installed though:
$ gem list | grep coffee-rails
coffee-rails (4.0.1)
Any ideas on what's going on?
According to the Bundler page:
The specifier ~> has a special meaning, best shown by example. ~> 2.0.3 is identical to >= 2.0.3 and < 2.1. ~> 2.1 is identical to >= 2.1 and < 3.0. ~> 2.2.beta will match prerelease versions like 2.2.beta.12.
As such, version 4.0.1 of your gem is still not the specified one, that is between 3.2.1 and <3.3.
Just run
bundle install
Or, if you were unable to get a project directory with a valid Gemfile:
gem install coffee-rails --version 3.2.1
And it should install a compatible version.
I figured it out. After I got that error, I just went ahead and ran bundle install on the newly created app folder. It installed the missing dependencies and rails new is working now.