14

i found this post in stack overflow rubymine error: You have already activated rake 10.0.3, but your Gemfile requires rake 0.9.6. Using bundle exec may solve this

that offesr two possible solutions:

  • ignoring global gem path in the project settings
  • uninstalling the problematic gem

So far none of these solutions worked for me: I tried ignoring the global gem path, but I keep getting the same error message. With regards to uninstalling the gem, well, that's not possible as I have other projects depending on the newer rake version, which I don't want to mess up with.

What would be a way to force RubyMine into using bundle exec before rake tasks?

Community
  • 1
  • 1
gaudi_br
  • 183
  • 2
  • 12
  • running `bundle update` can sometimes resolve this. Another simple way is to remove `rake 10.0.3` from a terminal window, `gem uninstall rake` and then pick `10.0.3` from the list you are presented. – muttonlamb Nov 18 '13 at 00:13
  • The uninstall worked, thanks. – gaudi_br Nov 18 '13 at 03:50

1 Answers1

27

Go to Run -> Edit Configurations, select the BUNDLER tab, and click the checkbox "Run the script in context of the bundle (bundle exec)"

Pete
  • 10,310
  • 7
  • 53
  • 59
Renews
  • 614
  • 5
  • 17