sam1vp
sam1vp

Reputation: 78

Rails can't find my gems

I'm working on a newly configured computer, and can't seem to get rails to play nicely with my gems. Below are some of the errors I'm running into.

If I run 'script/console' in a rails project, I get the following error:

Missing the Rails gem. Please gem install -v= rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

If I run 'rails -v' I get the following error:

/Library/Ruby/Site/1.8/rubygems.rb:777:in `report_activate_error': RubyGem version error: activesupport(1.4.4 not = 2.3.4) (Gem::LoadError)

Both activesupport and rails gems are installed and updated, and are listed when I run 'gem list.' Any ideas? Thanks!

Upvotes: 1

Views: 6106

Answers (1)

vrish88
vrish88

Reputation: 21487

Is the location of the gems defined? (either in ~/.bash_profile or ~/.bashrc)

Something like:

  export GEM_PATH=/Library/Ruby/Gems/1.8/:${GEM_PATH}

You'll want to see if you have gems on your home directory or off the root. You can do this by running gem environment.

Upvotes: 3

Related Questions