Reputation: 2118
I Just moved to site 5 after creating my application offline. I am having problems with rake. When i try to run cd ~/MYAPP/; rake db:migrate --trace RAILS_ENV='production'
I get the following error
You have already activated rake 0.8.7, but your Gemfile requires rake 0.9.2. Consider using bundle exec.
When i try to unistall rake 0.8.7 I get the following warning.
addressable-2.2.6 depends on [rake (>= 0.7.3)]
execjs-1.2.6 depends on [rake (>= 0)]
execjs-1.2.4 depends on [rake (>= 0)]
friendly_id-3.3.0.1 depends on [rake (~> 0.9.2)]
launchy-2.0.5 depends on [rake (~> 0.9.2)]
multi_json-1.0.3 depends on [rake (~> 0.9)]
orm_adapter-0.0.5 depends on [rake (>= 0.8.7)]
rack-1.3.2 depends on [rake (>= 0)]
rack-1.2.3 depends on [rake (>= 0)]
rack-mount-0.8.3 depends on [rake (>= 0)]
railties-3.1.0 depends on [rake (>= 0.8.7)]
railties-3.0.9 depends on [rake (>= 0.8.7)]
sprockets-2.0.0 depends on [rake (>= 0)]
therubyracer-0.9.4 depends on [rake (~> 0.9.1)]
thor-0.14.6 depends on [rake (>= 0.8)]
treetop-1.4.10 depends on [rake (>= 0)]
I have seen a lot of articles about uninstalling one. When i remove rake 0.9.2 i get an error
no such file to load -- rake/dsl_definition
When already have the following in my rake file.
require 'rake/dsl_definition'
require 'rake'
Has anyone solved this problem, I have tried all too
You have already activated X, but your Gemfile requires Y
Upvotes: 2
Views: 2838
Reputation: 10412
Try to run this command:
bundle exec rake db:migrate --trace RAILS_ENV=production
In this way you should launch your command with the pack of gem bundled with your app.
Upvotes: 8