2

I started getting this error and would like a way to fix it:

You have already activated rake 10.1.1, but your Gemfile requires rake 10.1.0. Using bundle exec may solve this.

I am running this from within RubyMine. I can see in my Gemfile.lock where it specifies 10.1.0. Can I just manually update my Gemfile.lock to 10.1.1?

If I do:

$gem list 
....
rake (10.1.1, 10.1.0, 10.0.4, 0.9.2.2)

So I'm not sure why it isn't just working with 10.1.0?

Here's the full output from RubyMine:

/Users/jt/.rvm/rubies/ruby-1.9.3-p448/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/jt/.rvm/gems/ruby-1.9.3-p448/bin/rake spec
Testing started at 3:15 PM ...
rake aborted!
You have already activated rake 10.1.1, but your Gemfile requires rake 10.1.0. Using bundle exec may solve this.
/Users/jt/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in `block in setup'
/Users/jt/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:19:in `setup'
/Users/jt/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
/Users/jt/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
/Users/jt/repos/app/config/boot.rb:6:in `<top (required)>'
/Users/jt/repos/app/config/application.rb:1:in `<top (required)>'
/Users/jt/repos/app/Rakefile:5:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'
(See full trace by running task with --trace)

Process finished with exit code 1
timpone
  • 19,235
  • 36
  • 121
  • 211
  • Go to Edit Configurations > Bundler > check Run the script in context of the bundle (bundle exec), restart and check result. – zrl3dx Jan 03 '14 at 23:33
  • Are you managing your ruby versions with rvm or rbenv? If you're using rvm are you also using gemsets? Check your Rubymine settings to ensure that it is using the same ruby/gemset environment in your project that you do on the command line. – Jon Jan 04 '14 at 00:24
  • thx ideally, can I unactivate rake 10.1.1? I really just want it to be the way that it was. Using bundle exec works but painful – timpone Jan 04 '14 at 01:46
  • So are you using gemsets? It seems like you have all gems in one gemset, probably that's why you have to run scripts in context of bundle exec. I have several projects (all with distinct gemsets) and they work fine in RubyMine without checking that option. – zrl3dx Jan 04 '14 at 15:12

1 Answers1

5

You can remove your

Gemfile.lock file 

and exec

bundle update
Dheer
  • 773
  • 1
  • 6
  • 16