I'm trying to upgrade to latest haml gem. Here is the part of the Gemfile:
gem "haml", "~> 4.0.2"
gem "haml-rails", "~> 0.4", :group => :development
However, it seems that another gem:
gem "dj_mon", "~> 1.1.0"
requires an older version of haml. So when I run bundle update, I get:
Bundler could not find compatible versions for gem "haml":
In Gemfile:
dj_mon (~> 1.1.0) ruby depends on
haml (~> 3.1) ruby
haml (4.0.2)
Any idea on how to fix this?
You have a dependency conflict. I'm not an expert on this, but it seems to me you have two choices:
Update to the latest version of haml which is compatible with dj_mon (I think 3.1.8), and then wait until the maintainers of the gem update its dependencies, at which point the conflict is gone.
If you really want to use the latest version of haml, then you could fork the dj_mon gem, update the dependency, run the tests for the gem and if all goes well, you can just replace the dependency with your forked version for the time being.
Hope that helps.
Related
I have a problem with my gemset.
I created a new one after a fresh install on my computer, just one step after cloning the repo.
Running bundle install but I get this error
Could not find gem 'sprockets (= 2.2.2.backport2) ruby' in the gems available on this machine
I'm using Rails 3.2.11 and ruby 2.1
I have followed the suggestion of the bootstrap-sass Readme
But it doesn't work
Here is the part of my Gemfile with assets group
group :assets do
gem 'sass-rails', " ~> 3.2.3"
gem 'compass-rails'
gem 'sprockets-rails', '=2.0.0.backport1'
gem 'sprockets', '=2.2.2.backport2'
gem 'bootstrap-sass', '~> 3.1.1'
gem 'coffee-rails', "~> 3.2.1"
gem 'uglifier', '>=1.0.3'
gem 'eco'
gem 'i18n-js'
end
The project works on other machines. What can I do?
UPDATING THE QUESTION
Now I have the same problem but with rbenv, and I don't know how to solve it because rbenv doesn't have gemsets!
I had the same issue yesterday. A colleague of mine came across a Twitter conversation which points to a new fork of Sprockets with a 2.2.2.backport2-type tag.
You can get it on GitHub or add it to your Gemfile:
gem 'sprockets', github: 'tessi/sprockets', branch: '2_2_2_backport2'
I have solved the problem following these steps:
Change the gemfile replacing the sass-rails gem with this one: gem 'sass-rails', github: 'guilleiguaran/sass-rails', branch: 'backport'
Create and use a new empty Gemset
Go here and download this gem sprockets 2.2.2 backport2
Copy the downloaded gem in vendor/cache section
run bundle install
This should solve the problem related to this gem sprockets (= 2.2.2.backport2) ruby because it will be installed by the downloaded one.
Not the best, but I found the gem and cached it (put it in vendor/cache) based on this: https://github.com/aliw77/sprockets-2.2.2.backport2. I have a feeling there's another solution, still looking for it.
I'm getting this error after bundle install. How can I fix it?
Bundler could not find compatible versions for gem "excon":
In Gemfile:
locomotive-heroku (~> 0.0.2) ruby depends on
excon (~> 0.9.4) ruby
excon (0.20.0)
Uninstall the latest version of the gem: gem uninstall excon -v=0.20.0. Then bundle install again to see if it resolved the problem.
i fixed it by putting the locations for the current repos for locomotive/engine and locomotive/heroku. I.e gem 'locomotive-heroku', git: 'repolocation', require: 'locomotive/heroku' This is also what eventually got me a working installation of locomotivecms on heroku. I did need to set it to compile assets in the production environment.
I have rails 3.017, and clearance 1.0.0.rc2 and trying to install gem 'jquery-rails', '~> 2.1'
Do I need an older version of jquery-rails? If so, how can I figure this out?
thanks
Joel
Bundler could not find compatible versions for gem "railties":
In Gemfile:
jquery-rails (~> 2.1) ruby depends on
railties (< 5.0, >= 3.1.0) ruby
clearance (= 1.0.0.rc2) ruby depends on
railties (3.0.17)
Yes, you need an older version of this gem. If you don't specify a certain version of jquery-rails in your Gemfile, Bundler will find the matching version for you, if you run bundle install.
You can find out the dependencies of a gem with the gem manager:
$ gem dependency jquery-rails -v 2.1.3
I have been using the less-rails-bootstrap gem from https://github.com/metaskills/less-rails-bootstrap in my rails 3.1 project.
I want to upgrade to the 2.0wip version of bootstrap and I found a fork with the same name under https://github.com/sgruhier/less-rails-bootstrap
Both version say to install you add gem 'less-rails-bootstrap' to your gemfile.
Well, how is bundler going to know which one to use? What if 20 people had gems with the exact same name?
I guess the bigger question is how to I specify which gem to use?
Bundler will use the one found on http://rubygems.org, which is the one at the first link you posted.
When trying to use an unreleased branch/fork, you should pass the :git option in your Gemfile to tell Bundler to use that git repository:
gem 'less-rails-bootstrap', :git => "git://github.com/sgruhier/less-rails-bootstrap.git"
After following railstutorial.orgI am trying to run bundle install. It list use of gem like :
Using railties (3.0.7)
Using rails (3.0.7)
Using sass (3.1.3)
And this error :
Installing rbx-require-relative (0.0.5) /home/canard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:364:in `ensure_required_ruby_version_met': rbx-require-relative requires Ruby version ~> 1.8.7. (Gem::InstallError)
from /home/canard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:135:in `install'
...
I understand ruby 1.9.2 needs rbx-require-relative, but why it doesn't want to install it. It demand ruby ruby 1.8.7. I am little lost.
Further more after this error it stop, and my gem in my Gemfile are never read or installed...
I'm using ruby 1.9.2p180 and rails 3.0.7
Thanks for your help
rbx-require-relative is a port of Ruby 1.9’s relative_relative for Rubinus and MRI 1.8
If you're running ruby1.9 then you don't need it. Remove it from your Gemfile.
Don't require ruby-debug in your Gemfile as it has rbx-require-relative as a dependency.
Add gem 'ruby-debug19' instead
You might try to install the the ruby-debug19 gem for ruby 1.9.2.
Here is the gem info:
http://rubygems.org/gems/ruby-debug19
Here is the bundler line:
gem 'ruby-debug19'
Replacing
gem 'ruby-debug'
with
gem 'ruby-debug', :platforms => :ruby_18
gem 'ruby-debug19', :platforms => :ruby_19
in my Gemfile solved this problem for me, working on both Ruby 1.8 and 1.9.