I'm using Rubymine (version 4.5.3) and my environment looks like described here (http://stackoverflow.com/questions/17190049/rake-task-or-bundle-exec-rake-task):
Ruby version: ruby-1.9.3-p429 [ x86_64 ]
Rails version: 3.2.8
I'm not able to execute "rake db:prepare" on command line but - as answered on stackoverflow - it's not recommended to use it this way. Instead of "bundle exec rake task" should be used.
But even if everything is working as expected on CLI, Rubymine compains about missing gems and tests cannot be executed as well.
Here is the output of Rubymine:
3:00:34 PM RubyMine Gem Manager
RubyMine has detected that
some of the gems required for 'prototyp1'
are not installed
Install missing gems
3:00:34 PM RubyMine Database Integration
Rails data sources detected, but some
additional drivers are required for RubyMine
to connect to the database
3:01:17 PM Error running users_spec: RSpec support is disabled because 'rspec-rails' gem or RSpec Rails plugin are missing. Install and activate gem at first
I clicked on the "Install missing gems" and Rubymine is just installing the gems somewhere again (Note: the gemset used in Rubymine - Settings/... - is correct and matches the gemset used on CLI):
/home/katarina/.rvm/rubies/ruby-1.9.3-p429/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/katarina/.rvm/gems/ruby-1.9.3-p429@prototyp1/bin/bundle install
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Installing rake (10.0.4)
Installing i18n (0.6.4)
Installing multi_json (1.7.7)
Installing activesupport (3.2.8)
Installing builder (3.0.4)
Why is that necessary and where should I tell Rubymine which environment must be used when starting rake tasts and so on? I did it already by picking the right gemset in Menu / Settings.... Are there any temporary files which contain the wrong values?
When I click "Run.../ "Run users_spec" I get this error:
Cannot find RSpec runner script for RVM: ruby-1.9.3-p429 [prototyp1] SDK
(Maybe this has nothing to do with the previous trial of Rubymine to install the gems again rather than using the configured gemset.)
Answers are appreciated!