update your RAILS_GEM_VERSION setting in config/environment.rb

While I am able to start the rails project from command line I am unable to do it from RubyMine run...


From Ruby Mine:
/usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /Users/ajayreddy/RubymineProjects/MetaJack/script/server -p 3000 -b 127.0.0.1 -e development
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.
Process finished with exit code 1


All the gems are installed and attached including rails v 2.3.5


I did comment out the rails version in environment.rb to use whatever available

I am using Ruby 1.9.1 p 378.


Help most appreciated.

Thanks,
Meta

3 comments

Hello Meta,

Most likely you have several Ruby interpreters on your machine. And your RubyMine is configured for using Ruby 1.8.6.
1. Please show results of RubyMine | Tools | Show Gem Environment
2. If 1) show that  you are using not a Ruby 1.9.1 interpreter you will need to configure it at RubyMine | File | Settings | Ruby SDK and Gems | Add SDK ...

0

HI Roman,

Thanks for responding.. Both are set to the same..


The Ruby SDK in Preferences>Ruby SDK and Gems(attached) is the same as my gem environment below...


RubyGems Environment:
RUBYGEMS VERSION: 1.3.6
RUBY VERSION: 1.9.1 (2010-01-10 patchlevel 378) [i386-darwin10.3.0]
INSTALLATION DIRECTORY: /Users/ajayreddy/.rvm/gems/ruby-1.9.1-p378
RUBY EXECUTABLE: /Users/ajayreddy/.rvm/rubies/ruby-1.9.1-p378/bin/ruby
EXECUTABLE DIRECTORY: /Users/ajayreddy/.rvm/gems/ruby-1.9.1-p378/bin
RUBYGEMS PLATFORMS:
  ruby
  x86-darwin-10
GEM PATHS:
   /Users/ajayreddy/.rvm/gems/ruby-1.9.1-p378
   /Users/ajayreddy/.rvm/gems/ruby-1.9.1-p378@global
GEM CONFIGURATION:
   :update_sources => true
   :verbose => true
   :benchmark => false
   :backtrace => false
   :bulk_threshold => 1000
REMOTE SOURCES:
   http://rubygems.org



Attachment(s):
Screen shot 2010-04-29 at 9.41.53 AM.png
0

According to the screenshot your RubyMine version isn't 2.0.2 or 2.0.2 rc3. Older versions doesn't support rvm gem thus you need to update RubyMine upto 2.0.2. Then please delete RVM sdks which you've manually created and let RubyMine 2.0.2 to configure RVM sdks automatically. Latest RubyMine build you can find at http://www.jetbrains.com and brief FAQ about rvm support at http://blogs.jetbrains.com/ruby/2010/04/rvm-support-in-rubymine-2-0-2/

0

Please sign in to leave a comment.