initialized constant RAILS_ROOT
Whilst following these instructions to install wizard开发者_运维知识库ly-examples, I get the following error:
[wizardly-examples]$ rake gems:install
(in /Users/jason/Rails/wizardly-examples)
(eval):1: warning: already initialized constant RAILS_ROOT
rake aborted!
wrong number of arguments (1 for 0)
/Users/jason/Rails/wizardly-examples/Rakefile:4:in `<top (required)>'
Can anyone advise how to resolve the issue? Thank you
This could be an out of date gem that's causing trouble. rake gems:install
for one never worked properly, and has been eliminated in favor of:
bundle install
Rails 3 has switched to the bundler system by default. Older projects may still have the old task but it shouldn't be used. Since the Rakefile
was often dependent on the very gems it was trying to install, you can see how it was a bad idea from the start.
In general if you're having trouble with rake
tasks be sure to engage the --trace
option to get a better idea of where it's going wrong.
精彩评论