When I run rake db:create:all
, I’m getting the following message:
/Users/junior/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/versio
I found a hint on the internet how to avoid the error. See the link to "Rail 3.1 and Rake aborted". There is given no reason, but to use bundle exec rake
instead of the pure rake call has done the trick there. Seems like the call for rake is calling itself recursively, without having noticed that the files are yet loaded.
So give it a try and tell us if that worked for you.
I've found another way to do not have to run bundle exec
every time.
For myself, working w/ Sinatra (not Rails), adding gem 'rake'
to my Gemfile worked like a charm. :)
If, like me, you are too lazy to use bundle
every time:
Want to see a magic trick? Try running gem uninstall rake
. Confirm when asked about broken dependencies. Counter-intuitive, I know.
Now run your rake
command without bundle exec
. Magic!
I don't know how it really works, but I'm thinking it has something to do with your local/global gemsets; your rvm global rake should be the one being used now.
No, this may not good practice, but like I said, it's for the lazy.
Command gem uninstall rake
showes me that I have multiple rake gems installed, after removing 2 out of 3 I don't need to use bundle exec
any more!