How do I fix this gem dependency problem in Rails 3 (bundler)? - ruby-on-rails

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'

I had the exact same issue and it got resolved by the following two lines in my Gemfile:
gem 'twitter', :git => 'https://github.com/jnunemaker/twitter.git'
gem 'omniauth', :git => "git://github.com/intridea/omniauth.git" ,:ref => "b9fe79961ab56041dbf9"

try deleting your Gemfile.lock (file) and then do
bundle install

Related

Stack level too deep upgrading to Rails 3

I'm upgrading an app to Rails 3 and have been going through it bit by bit, for example replacing all the old plugins with the relevant gems in the gemfile.
I seem to have got stuck however because now whenever I try to run the server I get this:
=> Booting WEBrick
=> Rails 3.0.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551#rails3/gems/rack-1.2.8/lib/rack/builder.rb:35: stack level too deep (SystemStackError)
I've been googling it for ages and have come to the conclusion that it is still because of one of the plugins, I just can't figure out which one. I have removed each one individually but none of them makes a difference.
I found these three similar questions but they don't really help me....
Stack level too deep error after running bundle update
SystemStackError at the rack level in Ruby 1.9.2, not 1.8.7
Stack level too deep trying to update from 3.0 to 3.1
My gemfile looks like this at the moment:
source 'https://rubygems.org'
gem "rails", "3.0.0"
#need to replace old acts_as_commentable vendor plugin
gem 'acts_as_commentable', '3.0.1'
gem "airbrake"
#need to add authlogic gem
gem 'authlogic', '~> 2.1.6'
gem "aws-s3"
gem "bj"
gem "bundler", "~> 1.0.0"
gem "calendar_date_select", "1.15"
gem "cancan", "1.2.0"
gem "carmen"
#replace plugin casein?
gem 'casein', '3.1.0'
gem 'comma', '0.4.1'
gem 'exifr'
# factory_girl 1.2.4 wasn't working with Rails 3 - consider an upgrade to factory_girl_rails?
# gem "factory_girl", "1.2.4"
gem 'fastercsv'
gem "geokit"
#need to replace above with below
gem 'geokit-rails'
gem "haml"
gem "hpricot"
gem 'hoptoad_notifier'
gem "jrails"
gem "libxml-ruby", "2.4.0"
gem "memcached", "~> 1.8.0"
#memcached no longer works?
gem 'dalli'
# Not sure why we have this if we're using SQLite3
gem "mysql2", "~> 0.2.6"
#TODO: changed by almazom
gem "rake", "0.8.4"
gem 'recurly'
gem "rdoc"
gem "rmagick"
gem "rspreedly"
gem "rubyzip"
gem 'sass'
# searchlogic not supported for rails3
# gem 'searchlogic'
gem 'rd_searchlogic', :require => 'searchlogic', :git => 'git://github.com/railsdog/searchlogic.git'
#need to use simplecov when upgrading to ruby 2 as rcov doesn't work
gem "simplecov"
gem 'sqlite3'
# tmail no longer included in rails 3?
gem 'tmail'
#need to upgrade will_paginate for casein...?
# gem "will_paginate", "2.3.16"
gem 'will_paginate', '3.0.4'
gem 'yaml_db'
group :development, :test do
gem 'test-unit', '1.2.3'
gem 'rspec', '1.3.2'
gem 'rspec-rails', '~> 1.3.4'
end
group :test do
gem 'capybara', '0.3.5'
gem 'cucumber', '1.1.2'
gem 'cucumber-rails', :git => "git://github.com/RKelln/cucumber-rails.git", :branch => "0.3.2-capybara-fix"
gem 'database_cleaner'
end
And the plugins I have are:
acts-as-favorite-updated
acts_as_configurable
acts_as_follower
better_logging
concerned_with
default_value_for
fast_context
fetcher
has_many_friends
jrails
paperclip
parallel_tests
rails_upgrade
yaml_db
Does anyone have any idea how I can deal with this issue?? :-(

bundle install circular dependencies

The following console logs should describe the issue
bundle install
Could not find multi_json-1.1.0 in any of the sources
Run `bundle install` to install missing gems.
bundle install asks me to bundle install.
Have tried: https://github.com/mpapis/rubygems-bundler/issues/4
Looked at: https://github.com/carlhuda/bundler/issues/865
Not sure where to go next.
Also of interest, if we comment all the gems from inside vendor/gems the bundle works fine.
source 'http://rubygems.org'
gem 'rails', '~> 3.2.2'
gem 'mysql2'
gem 'thin'
# Asset template engines
gem 'coffee-script'
gem 'uglifier'
gem 'sprockets'
gem 'less-js'
gem 'execjs'
gem 'nokogiri'
gem 'lucy'
gem 'babilu'
gem 'simple_form'
gem 'mechanize'
gem 'geoip'
gem 'less'
gem 'bb-ruby'
gem 'client_side_validations', "~> 3.2.0.beta.2"
gem 'client_side_validations-simple_form'
gem 'require_all'
#for avatars
gem 'paperclip'
gem 'rmagick'
gem "multipart-post"
gem 'gibberish'
# Memcached client
gem 'dalli'
#to support tables without auto-incrementing primary keys
gem 'composite_primary_keys', "~> 5.0.1"
gem 'calendar_helper', :require => 'calendar_helper'
gem 'jquery-rails'
gem 'capistrano'
gem 'capistrano-ext'
gem 'simple_form'
gem 'htmlentities'
gem 'will_paginate'
gem 'airbrake', :path => "vendor/gems/airbrake"
gem "uservoice", :path => "vendor/gems/uservoice"
# For spambots
gem "honeypot-captcha"
# Internationalization GUI
gem "tolk", :git => "http://github.com/miloops/tolk.git", :branch => "rails31"
gem "will-paginate-i18n"
gem "omniauth"
gem "omniauth-facebook"
gem "omniauth-justintv", :git => 'http://github.com/themindoverall/omniauth-justintv.git'
gem 'oauth'
gem 'rails-i18n'
# For rate limiting
gem "rack-throttle", :path => "vendor/gems/rack-throttle"
gem "xfire-api", :path => "vendor/gems/xfire-api"
gem "anametrix", :path => "vendor/gems/anametrix"
#To make ruby debug work see: http://stackoverflow.com/questions/6438116/rails-with-ruby-debugger-throw-symbol-not-found-ruby-current-thread-loaderro
group :development, :test do
#gem 'ruby-debug-base19', '0.11.26', :path => "~/.rvm/gems/ruby-1.9.3-p#{RUBY_PATCHLEVEL}/gems/ruby-debug-base19-0.11.26/"
#gem 'linecache19', '0.5.13', :path => "~/.rvm/gems/ruby-1.9.3-p#{RUBY_PATCHLEVEL}/gems/linecache19-0.5.13/"
#gem 'ruby-debug19', :require => 'ruby-debug'
gem 'ruby_parser'
end
group :test do
gem 'ruby-prof'
gem 'test-unit' # For performance testing
gem 'turn', :require => false
gem 'factory_girl_rails', "~> 1.0.1"
gem 'capybara', "~> 1.0.0"
gem 'database_cleaner', '~> 0.6.7'
gem 'rspec-rails', "~> 2.6.1"
gem 'cucumber-rails', "~> 1.0.0"
gem 'webrat', "~> 0.7.3"
gem 'autotest'
gem 'simplecov'
gem 'autotest-rails-pure'
gem 'simplecov', :require => false, :group => :test
gem 'spork'
end
group :production do
gem 'rack-google_analytics', :require => "rack/google_analytics"
end
Have you declared that gem in your Gemfile? Sometimes it helps to specify a specific version as you've done for some:
gem 'multi-json', '1.1.0'
If anyone turns out to be stuck on this what turned out to be the answer is one of our homegrown gems:
gem "xfire-api", :path => "vendor/gems/xfire-api"
had a require in it provided by a gem that was not specified in the gemspec. If you're stuck on this and have homegrown gems take a look through all your requires and makes sure all the files are provided by gems you specify in the Gemspec.

no such file to load -- openid/store/filesystem (Rails omniauth)

This is first time I'm trying to use Omniauth. While I was testing https://github.com/pt/devise-omniauth-example this example from github I came across an error
.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require': no such file to load -- openid/store/filesystem (LoadError)
Here is my Gemfile content
source 'http://rubygems.org'
gem 'rake'
gem 'rails'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'devise', :git => 'git://github.com/plataformatec/devise', :branch => 'master'
gem "omniauth", "1.0.1"
gem 'paperclip'
gem "simple_form", "~> 1.5.2"
gem 'twitter_oauth', '0.4.3'
gem "rest-client", "1.6.7", :require => "restclient"
gem "sluggable"
group :development, :test do
gem 'rspec-rails'
gem 'fixjour'
end
I search web but there was no luck.
According to this:
If you get "openid/store/filesystem (LoadError)" then you may need to add this to your Gemfile:
gem "oa-openid"
This is due to various versions of Gems you are using and the dependencies among them.
In the example at https://github.com/pt/devise-omniauth-example,
if you notice the Gemfile ,there is
gem 'omniauth', '0.2.0'
but in your Gemfile above, you are using
gem "omniauth", "1.0.1"
Add gem 'ruby-openid-apps-discovery', and add below in application.rb.
require 'omniauth-openid'
require 'openid'
require 'openid/store/filesystem'
require 'gapps_openid'

Rails [3.1.0.rc1] webrick freeze on http 500 error

since I installed rails 3.1.0, when some bugs occur, Webrick freezes for a couple of minutes when some bugs occur (not all bugs, apparently the 500 ones).
My gemfile looks like this:
source 'http://rubygems.org'
gem "rails", "3.1.0.rc1"
#Asset template engines
gem 'sass'
gem 'coffee-script'
gem 'uglifier'
gem 'jquery-rails'
gem "simple-navigation"
gem 'ranked-model' #, :git => 'git#github.com:harvesthq/ranked-model.git'
gem 'formtastic'
gem 'validation_reflection'
gem "paperclip", "~> 2.3"
gem 'devise'
gem 'heroku'
gem "aws-s3"
gem "scoped_search"
gem "meta_search", :git => 'git://github.com/ernie/meta_search.git'
gem "kaminari"
group :production do
gem "pg", "~> 0.11.0"
gem 'therubyracer-heroku', '0.8.1.pre3'
gem 'exception_notification', :require => 'exception_notifier'
end
group :development, :test do
gem 'mysql2'
end
require 'csv'
I'm on Mac OS X 10.6.7.
Can anyone help me on this? Thanks,
Nicolas
Try using mongrel, or another dev server such as unicorn.
Just add it to your gemfile
gem 'mongrel'

Spree 0.50.0 Error registering calculator Calculator::PriceBucket

I am trying to configure Spree on Heroku, I have the website running
offline using thin but every now and again it will throw the error
"Error registering calculator Calculator::PriceBucket"
I have tried setting config.cache_classes to both on and off
Also my gem file is configured as shown
source 'http://rubygems.org'
# Generic gem dependencies first
gem 'rails', '3.0.7'
gem 'sqlite3', :group => :development
gem 'aws-s3'
# Followed by spree itself first, all spree-specific extensions second
gem 'spree', :git => 'git://github.com/spree/spree.git'
gem 'spree_active_shipping', :git => 'git://github.com/spree/spree_active_shipping.git'
gem 'spree_product_assembly', :git => 'git://github.com/spree/spree-product-assembly.git'
gem 'spree_static_content', :git => 'git://github.com/spree/spree_static_content.git'
gem 'spree_heroku', '1.0.0', :git => 'git://github.com/paxer/spree-heroku.git'
# EOFs
As is suggested here http://railsdog.lighthouseapp.com/projects/31096/tickets/1777-error-registering-calculator-calculatorpricebucket
How can I fix this?
Thanks
maybe this helps to you... price-bucket-calculator
I solved this by changing gem load order in the gemfile as specified at following URL:
http://railsdog.lighthouseapp.com/projects/31096/tickets/1777-error-registering-calculator-calculatorpricebucket

Resources