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.
Related
In command prompt I run
rails server
and it gives me the error: "could not find nokogiri -1.10.0 in any of the sources"
I then go to install the gem:
gem install nokogiri -v 1.10.0
and git gives me the error: "The last version of nokogiri (=1.10.0) to support your Ruby & RubyGems was 1.10.0. nokogiri requires Ruby version >= 2.3, < 2.7.dev. The current version is 2.7.2.137
How do I get around this issue?
Also, I'm sure I'm going to run into a similar problem again every time I try to run
rails server
It keeps telling me there is a missing gem which tells me me there is something wrong with the install. I have uninstalled and reinstalled Ruby multiple times but the issue doesn't get resolved. Help with my first question would be great but help with my overarching issue would be even more appreciated.
Thanks,
The version of Nokogiri you try to install is not compatible with the latest version of Ruby. You have two options:
Downgrade Ruby to <= 2.6.6 or
Upgrade Nokogiri to >= 1.10.4
It depends on your application which option to choose.
I would prefer upgrading Nokogiri to the latest version. To do so change the version of Nokogiri in your Gemfile to 1.10.10 and run
$ gem install nokogiri -v 1.10.10
$ bundle update nokogiri
Bundle install complains that it can't find compatible versions for gem "actionmailer," even though the dependency constraints it shows in the error do not conflict.
It gives me this output running bundle install which I'm so stumped by
In Gemfile:
premailer-rails was resolved to 1.10.3, which depends on
actionmailer (>= 3)
rails (> 3.0, < 3.2.22.1) was resolved to 3.2.22, which depends on
actionmailer (= 3.2.22)
The dependencies appear to not conflict at all.
I have tried explicitly setting rails to '3', instead of 3.2.22.1, which seems to remove the error. But isn't 3.x.x.x equal to >3 ?
In my Gemfile:
gem 'rails', '<3.2.22.1', '>3.0'
gem 'premailer-rails'
... #other gems
The output shows it resolves rails to 3.2.22, and that actionmailer >=3 is a dependency for premailer-rails, and actionmailer = 3.2.22 is a dependency for rails.
All constraints are met. 3.2.22 is >=3, and the dependency should resolve. What am I missing?
Did you install more recent Rails in this directory before? In this case bundler remembers its dependent actionmailer version and now this more recent actionmailer prevents installing the older one. Because install action in fact does conservative updating, analyzing only changes between last Gemfile.lock and current Gemfile.
Anyway, remove Gemfile.lock and run bundle install again.
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 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.
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.