Как мне исправить эту проблему с гем-зависимостью в Rails 3 (bundler)? - PullRequest
2 голосов
/ 03 июля 2011

По какой-то причине мой проект испортился и теперь выдает ошибки каждый раз, когда я пытаюсь запустить bundle install. Некоторые из ошибок, которые мне удалось исправить, переупорядочив драгоценные камни в моем Gemfile, но теперь я получаю это:

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)

Я думал, что использование bundler должно было стереть зависимость wtf's? Я предполагаю, что это сообщение означает, что два камня хотят 2 разных версии faraday ..?

Как мне решить эту проблему? Почему он не устанавливает обе версии, а каждый гем загружает ту версию, которую хочет?

Я хотел бы помочь с этим, пожалуйста!

Спасибо

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

Ответы [ 3 ]

5 голосов
/ 03 июля 2011

Конкретная версия Omniauth, которую вы используете, зависит от Фарадея ~> 0.7.3, тогда как для последней выпущенной версии самоцвета Twitter требуется 0,6.

Это можно исправить с помощью последней версии самоцвета Twitter из репозитория.

gem 'twitter', :git => 'https://github.com/jnunemaker/twitter.git'
1 голос
/ 30 сентября 2011

попробуйте удалить ваш Gemfile.lock (файл), а затем выполните

bundle install
1 голос
/ 01 августа 2011

У меня была точно такая же проблема, и она была решена следующими двумя строками в моем Gemfile:

gem 'twitter', :git => 'https://github.com/jnunemaker/twitter.git' 
gem 'omniauth', :git => "git://github.com/intridea/omniauth.git" ,:ref => "b9fe79961ab56041dbf9"
...