如何在Rails 3(bundler)中修复这个gem dependency问题? [英] How do I fix this gem dependency problem in Rails 3 (bundler)?
问题描述
出于某种原因,我的项目每次尝试运行 bundle install
时都出现了错误,现在抛出错误。我通过重新排列我的 Gemfile
中的宝石来解决一些错误,但现在我得到了这个:
Bundler无法找到适用于gemfaraday的兼容版本:
在Gemfile中:
omniauth取决于
faraday(〜> 0.7 .3)
twitter取决于
法拉第(0.6.1)
我认为使用bundler应该可以擦除依赖项 wtf's
?我假设这条消息意味着两个宝石需要两个不同版本的 faraday
..?
我该如何解决这个问题?为什么它不只是安装两个版本,并且每个gem都加载它想要的版本?
我很乐意为此提供一些帮助!
谢谢
Gemfile.lock:
https://gist.github.com/1061722
Gemfile:
#编辑此Gemfile以将您的应用程序的依赖关系。
source'http://rubygems.org'
gem'rails','3.0.9'#,:git => 'git://github.com/rails/rails.git'
gemhaml-rails
gemjquery-rails
#Gem将摘要常见于标准的宁静控制器
gem'inherited_resources'
#允许我们保存用户物品在其集合中的订单
gemacts_as_list
#用于简化用户注册和登录
#用于引用,因为在设计HEAD
gemdevise时出现问题,::git => git://github.com/plataformatec/devise.git,:ref => '4964f53a42a3d434ee6d731d6f999d8dae13dada'
#可能不会被使用
gemajaxful_rating
#为某些特定功能提供便利的编辑功能数据字段
gembest_in_place,:git => 'git://github.com/moabite/best_in_place.git'
#上传图片的Gem。比paperclip更灵活
gemcarrierwave,:git => 'git://github.com/jnicklas/carrierwave.git'
gemfog
#显然需要使uploadify多文件上传工作
gemflash_cookie_session
#用于我们可以通过carrierwave上传图片大小的调整,使用
#ImageMagick
gemrmagick
#轻松创建用于网站模拟的数据库模型
gemfactory_girl_rails
#用于假数据生成
gemfaker
gemrandexp
gemrandom_data
gem'forgery'
gemlorempixum,:require => 'lorempixum'
gemhashie
#gem'aws-s3',:require => 'aws / s3'
#gem'bcrypt-ruby',:require => 'bcrypt'
#为构建表单提供更短的语法
gem'formtastic'
#发送生产应用程序错误通知
gemhoptoad_notifier
#社交媒体宝石FB Connect,FB和Twitter
gemomniauth,::git => git://github.com/intridea/omniauth.git,:ref => b9fe79961ab56041dbf9
gemfb_graph
gemtwitter
gem'rake','0.8.7'
gemjammit
gemrest-client
gem'rails-erd',:git => git://github.com/voormedia/rails-erd.git
宝石nokogiri
组:开发,:测试
宝石后卫
gemguard-ego
gemguard-bundler
gemguard-jammit
gemguard-rails
gemguard-rspec
gemguard-shell
gemguard-compass
gemguard-livereload
gem'rb-fsevent',:require => false
gemrb-inotify,:require => false
gemlibnotify,:require => false
#需要运行html2haml将html转换为haml
gemhpricot
gemtap
gemheroku
#gemheroku-rails,::git => git://github.com/railsjedi/heroku-rails.git
gemheroku-rails,::git => git://github.com/sid137/heroku-rails.git
gemsqlite3-ruby,:require => 'sqlite3'
gemruby-debug19,:require => 'ruby-debug'
#在Rails控制台中显示好的表格
gemhirb
gemfacebook_test_users,:git => git://github.com/sid137/facebook_test_users.git
#允许我们将本地开发数据库推送到Heroku,并在本地拉
#heroku db
gemyaml_db
gemescape_utils
#基于Sass和Blueprint的开发机器css框架
#使用compass compile编译css部署之前
gemcompass,> = 0.11.1
#在app / model / *。rb文件中打印标题,列出
#每个模型
gemselenium-webdriver
gemrack-test
gemcapybara,:require => 'capybara / rspec'
gemlaunchy
gem'database_cleaner',:git => 'git://github.com/bmabey/database_cleaner.git'
gemrspec-core,2.6.4
gemrspec-rails#,'2.6。 0'#,'2.5.0'
#gem'shoulda-matchers',:git => 'git://github.com/thoughtbot/shoulda-matchers.git'
#gem'shoulda-matchers',::git => 'git://github.com/sid137/shoulda-matchers.git'
gemZenTest
gemautotest-rails
结束
您正在使用的Omniauth的特定版本取决于法拉第〜> 0.7.3,而最新发布的Twitter gem版本需要0.6。
您可以使用存储库中最新版本的Twitter gem来修复此问题。
gem'twitter',::git => 'https://github.com/jnunemaker/twitter.git'
For some reason, my project has messed up and now its throwing errors every time I try to run bundle install
. Somem of the errors i've managed to fix by reordering the gems in my Gemfile
, but now i'm getting this one:
Bundler could not find compatible versions for gem "faraday":
In Gemfile:
omniauth depends on
faraday (~> 0.7.3)
twitter depends on
faraday (0.6.1)
I thought that using bundler was supposed to erase dependency wtf's
? I'm assumingn this message means that two gems want 2 different versions of faraday
..?
How can I fix this problem though? Why doesn't it just install both versions, and each gem loads the version it wants?
I'd love some help on this please!
Thanks
Gemfile.lock: https://gist.github.com/1061722
Gemfile:
# Edit this Gemfile to bundle your application's dependencies.
source 'http://rubygems.org'
gem 'rails', '3.0.9' #, :git => 'git://github.com/rails/rails.git'
gem "haml-rails"
gem "jquery-rails"
# Gem to abstract away the dplication common in standard restful controllers
gem 'inherited_resources'
# Allows us to keep an order of a user's items in their collection
gem "acts_as_list"
# Used to simplify user registrations and logins
# Pined to ref, as there is problem on devise HEAD
gem "devise", :git => "git://github.com/plataformatec/devise.git", :ref => '4964f53a42a3d434ee6d731d6f999d8dae13dada'
# Might not be used
gem "ajaxful_rating"
# Facilitates Edit-in-place functionality for certain data fields
gem "best_in_place", :git => 'git://github.com/moabite/best_in_place.git'
# Gem for uploading images. More flexible than "paperclip"
gem "carrierwave", :git => 'git://github.com/jnicklas/carrierwave.git'
gem "fog"
# Apparently needed to make the uploadify multifile uploader work
gem "flash_cookie_session"
# Used to that we can resize images uploaded through carrierwave, using
# ImageMagick
gem "rmagick"
# Easily create database models for site simulation
gem "factory_girl_rails"
# Useful for fake data generation
gem "faker"
gem "randexp"
gem "random_data"
gem 'forgery'
gem "lorempixum", :require => 'lorempixum'
gem "hashie"
# gem 'aws-s3', :require => 'aws/s3'
# gem 'bcrypt-ruby', :require => 'bcrypt'
# Provides a shorter syntax for building forms
gem 'formtastic'
# Sends notifications of errors on Production app
gem "hoptoad_notifier"
# Social Media Gems FB Connect, FB, and Twitter
gem "omniauth", :git => "git://github.com/intridea/omniauth.git" ,:ref => "b9fe79961ab56041dbf9"
gem "fb_graph"
gem "twitter"
gem 'rake', '0.8.7'
gem "jammit"
gem "rest-client"
gem 'rails-erd', :git => "git://github.com/voormedia/rails-erd.git"
gem "nokogiri"
group :development, :test do
gem "guard"
gem "guard-ego"
gem "guard-bundler"
gem "guard-jammit"
gem "guard-rails"
gem "guard-rspec"
gem "guard-shell"
gem "guard-compass"
gem "guard-livereload"
gem 'rb-fsevent', :require => false
gem "rb-inotify", :require => false
gem "libnotify", :require => false
# Needed to run html2haml to convert html to haml
gem "hpricot"
gem "taps"
gem "heroku"
#gem "heroku-rails", :git => "git://github.com/railsjedi/heroku-rails.git"
gem "heroku-rails", :git => "git://github.com/sid137/heroku-rails.git"
gem "sqlite3-ruby", :require => 'sqlite3'
gem "ruby-debug19", :require => 'ruby-debug'
# nice table displays in Rails console
gem "hirb"
gem "facebook_test_users", :git => "git://github.com/sid137/facebook_test_users.git"
# Allows us to push the local development database up to Heroku, and pull the
# heroku db down locally
gem "yaml_db"
gem "escape_utils"
# Sass and Blueprint based css framework for dev machine
# use "compass compile . " to compile css before deployment
gem "compass", ">=0.11.1"
# Print a header in app/model/*.rb files, listing the db columns present for
# each model
gem "selenium-webdriver"
gem "rack-test"
gem "capybara", :require => 'capybara/rspec'
gem "launchy"
gem 'database_cleaner', :git => 'git://github.com/bmabey/database_cleaner.git'
gem "rspec-core", "2.6.4"
gem "rspec-rails"# , '2.6.0' #, '2.5.0'
#gem 'shoulda-matchers', :git => 'git://github.com/thoughtbot/shoulda-matchers.git'
#gem 'shoulda-matchers', :git => 'git://github.com/sid137/shoulda-matchers.git'
gem "ZenTest"
gem "autotest-rails"
end
The specific version of Omniauth that you're using depends on Faraday ~> 0.7.3, while the latest released version of Twitter gem needs 0.6.
You can fix this by using the latest version of Twitter gem from the repository.
gem 'twitter', :git => 'https://github.com/jnunemaker/twitter.git'
这篇关于如何在Rails 3(bundler)中修复这个gem dependency问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!