I have a Rails 3.0.3 project loaded into Rubymine on Mac OSX Lion. When I cd into the project directory on the terminal and run rails server -e development, everything runs fine.
However, when I run the command through rubymine, I note it runs as follows:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/charlesbacon/GIT/thewaypoint/script/rails server -b 0.0.0.0 -p 3000 -e development
Nothing wrong with that in essence; it's running the same Ruby binary in both terminal and rubymine. However, I get the following errer (see attachment for full detail) when the above is run via Rubymine.
/Library/Ruby/Gems/1.8/gems/activerecord-3.0.3/lib/active_record/connection_adapters/mysql_adapter.rb:30:in `mysql_connection': undefined method `init' for Mysql:Class (NoMethodError) Exiting
from /Library/Ruby/Gems/1.8/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:228:in `send'
All gems are installed fine; bundle install has everything up to date.
The focus of my investigates thus far has been the -e switch passed to ruby when run is invoked using rubymine:-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)
Now, if I remove this switch and parameter, the command runs fine from terminal. If I leave it in place the same error as above occurs.
So what command is Rubymine passing into this parameter, and can anybody help me understand why it's causing a problem in this instance? Any clues appreciated.