How to solve this dependency problem.
I`m using sorcery to administration and I dont need oauth2(0.4.1).
Bundler could not find compatible versions for gem "oauth2":
In Gemfile:
omniauth-facebook (>= 0) ruby depends on
oauth2 (~> 0.5.0) ruby
sorcery (>= 0) ruby depends on
oauth2 (0.4.1)
This is my Gemfile
gem 'sorcery'
gem 'omniauth-facebook'
gem 'omniauth-google-oauth2'
You should fork the sorcery gem and change this line to be this:
gem.add_runtime_dependency 'oauth2', '~> 0.5.0'
Then make a commit, push it to GitHub and then reference it in your application like this:
gem 'sorcery', :git => "git://github.com/regedarek/sorcery.git"
For bonus points, submit that patch as a pull request to the original sorcery repository.
Related
If I use gem 'rally_api' it will use version 0.9.8, which will failed to login rally with api_key
If I use gem 'rally_api', '~> 1.2', '>= 1.2.1' to install latest version 1.2.1(I mannully install in my local machine), the rake task can work, but I'll get compatible version error:
Bundler could not find compatible versions for gem "httpclient":
In Gemfile:
berkshelf (~> 4.3.5) was resolved to 4.3.5, which depends on
httpclient (~> 2.7)
rally_api (>= 1.2.1, ~> 1.2) was resolved to 1.2.1, which depends on
httpclient (= 2.6.0.1)
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.
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 am following rails casts episode 192 for cancan (http://railscasts.com/episodes/192-authorization-with-cancan?autoplay=true).
I have ruby 1.9.3
and rails 3.2.3
My gem file has this content
group :test, :development do
gem 'rspec-rails', '~> 2.5'
end
group :test do
gem 'cucumber-rails', '1.0.6'# use this instead of the one in the book
gem 'capybara'
gem 'database_cleaner'
end
gem 'dynamic_form'
gem 'factory_girl'
gem 'devise', '~>1.4.3'
gem 'email_spec'
gem 'cancan'
and in the environment.rb file I have added
config.gem 'cancan'
when I run bundle command I see this...
Using warden (1.0.6)
Using devise (1.4.9)
Using dynamic_form (1.1.4)
Using rspec-core (2.11.0)
Using rspec-expectations (2.11.1)
Using rspec-mocks (2.11.0)
Using rspec (2.11.0)
Now my question is: when I run:
sudo rake gems:install
then why do I see this:
Could not find warden-1.0.6 in any of the sources
Run `bundle install` to install missing gems.
and also in my gem.lock file why does it show...
devise (1.4.9)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
That railscast is from Dec 14, 2009 back when Rails 2 was the standard.
You should go through the instructions at https://github.com/ryanb/cancan which focus more on Rails 3 and Bundler.
bundle install will install your Gemfile contents into your current RVM gemset, in this case, probably the default gemset. Do NOT use sudo to install gems. To list the gems installed in the gemset, just run gem list. Run bundle list to show all of the gems in the current application bundle.
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.