views:

332

answers:

2

Hi there, 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!

A: 

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.

vrish88
that did the trick, thanks!
sam1vp
good to see, although if it is the correct answer please mark it as such.
vrish88
A: 

Thank you! Much useful!

Paddy