views:

57

answers:

2

My friend just shared me this new application and I pulled it from heroku

I was just trying to do rails -v and I got

denniss$ rails -v
/Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:132:in `block in resolve': Could not find gem 'selenium-webdriver', required by 'capybara', in any of the sources (Bundler::VersionConflict)
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:130:in `catch'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:130:in `resolve'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:153:in `resolve'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:93:in `specs'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:137:in `specs_for'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:126:in `requested_specs'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/environment.rb:23:in `requested_specs'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:11:in `setup'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler.rb:95:in `setup'
 from /Users/denniss/Sites/mogo-production/config/boot.rb:5:in `<top (required)>'
 from script/rails:8:in `require'
 from script/rails:8:in `<main>'

Edit: I did "bundle check" and I got this

/Library/Ruby/Site/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError)
    from /Library/Ruby/Site/1.8/rubygems.rb:214:in `activate'
    from /Library/Ruby/Site/1.8/rubygems.rb:1082:in `gem'
    from /usr/bin/bundle:18

Edit2:

Okay, the most up to date error that I gate after successfully installing rmagick is this. I was able to do rake db:create and migrate. I tried to do rails server (using rails3) and I get this error

/Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in `const_missing': uninitialized constant ActiveSupport::CoreExtensions (NameError)
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/facebooker-1.0.74/lib/facebooker/adapters/adapter_base.rb:6
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/facebooker-1.0.74/lib/facebooker.rb:259
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:64:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:64:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:62:in `each'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:62:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:51:in `each'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:51:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler.rb:107:in `require'
from /Users/denniss/Sites/mogo-production/config/application.rb:5
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.0.rc/lib/rails/commands.rb:28:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.0.rc/lib/rails/commands.rb:28
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.0.rc/lib/rails/commands.rb:27:in `tap'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.0.rc/lib/rails/commands.rb:27
from script/rails:9:in `require'
from script/rails:9
+1  A: 

The application requires a gem that isn't installed, in this case "selenium-webdriver." Try bundle check to see if there are additional errors, then proceed to install the gems you're missing.

Edit from comments:

In your first code block you're using MRI 1.9, then you moved on to MRI 1.8 and now you're suddenly using REE. That tells me that you've got (at least) three different Ruby interpreters on your computer, which isn't making your life easier. In all likelyhood, you've got gems all over the place as well. Do you have previous experience with RVM? If not, my suggestion would be to remove RVM, stick with one Rails interpreter (system default, MRI 1.8) and go from there.

vonconrad
please check my edit
denniss
Right. You're getting the `report_activate_error` because RubyGems can't find the bundle binary. Can you try to just install the 'selenium-webdriver' gem and see what happens when you do `rails -v` after that? You may also want to have a look in Gemfile in the Rails root directory to see other required gems.
vonconrad
please check the edit. Right now, rails -v gives me/Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/spec_set.rb:87:in `materialize': Could not find rmagick-2.13.1 in any of the sources (Bundler::GemNotFound)
denniss
In your first code block you're using MRI 1.9, then you moved on to MRI 1.8 and now you're suddenly using REE. That tells me that you've got (at least) three different Ruby interpreters on your computer, which isn't making your life easier. In all likelyhood, you've got gems all over the place as well. Do you have previous experience with RVM? If not, my suggestion would be to remove RVM, stick with one Rails interpreter (system default, MRI 1.8) and go from there.
vonconrad
@denniss Please don't ignore vonconrad's advice here. Your Ruby installation appears to be a complete mess, and you need to get that cleaned up first thing. RVM is great, but something is screwed up in the way that you are using it.
jdl
yea I have several rubies and now I am using RVM so because I want to be able to switch from 3 to 2. I was following an instruction on railscast and the guy used rvm so I just followed his advice. I didnt want to get bogged down by installation because I have this project that I need to work on ASAP. But I guess rushing did me more harm than good.
denniss
You can still switch between Rails 2 and 3 without having multiple Ruby interpreters. I do it on my own Mac just fine.
vonconrad
rvm is great, but you have to install the gems in each environment seperately. I think that is one of the things that is going wrong here.
nathanvda
thank you for all your help. Yea I saw that and thank you for pointing it out. I have the ruby inside usr/local/bin and other in rvm. I am using ree now for this specific app. In general, is it okay to have multiple multiple rubies attached to rvm. Isn't that the purpose of having rvm? is it okay to have multiple gems in each rvm's env?what I mean by 'okay' => will it do me more harm than good?
denniss
A: 

Installing rmagick is nearly a rite of passage for Rails developers. It's horrifying at first, but ultimately not that complicated. What the gem really wants to see during native compilation is an install of ImageMagick.

On Linux, I've usually had good luck with whatever package manager is in use. sudo apt-get install imagemagick for example.

If you are on OS X, then it's a bit more work. I've used port several times, and most recently brew to install ImageMagick. If you're on OS X, then head for Google and search for instructions with whatever package management system you happen to be using.

jdl