RVM设置,rake :: doc和“rake aborted!没有这样的文件加载 - 初始化器”

时间:2011-07-09 19:58:07

标签: ruby-on-rails ruby rake rvm

所以我想在OSX上安装RVM一段时间。在弄清楚我必须下载最新的XCode之后,我终于开始工作了。我安装了ruby 1.9.2并使用这些命令在rvm中创建了一个新的gemset:

rvm gemset create rails235
rvm 1.9.2@rails235
gem install rails -v 2.3.5

然后我进入了一个使用rails 2.3.5的旧应用程序并试图运行一些rakes和任何我运行的rake我似乎得到了这个错误:

rake aborted!
no such file to load -- initializer

另外,半相关,现在我正试图获得rdoc设置。我以前从未使用过,而且我正在输入“rake doc :: app”,我也遇到了同样的错误。

使用--trace的完整rake是这样的:

$ rake doc::app
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted!
Don't know how to build task 'doc::app'

(See full trace by running task with --trace)
brenton-wejrowskis-macbook-pro-2:bizzark wejrowski$ rake doc::app --trace
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted!
Don't know how to build task 'doc::app'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2/lib/rake/task_manager.rb:49:in `[]'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2/lib/rake/application.rb:111:in `invoke_task'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/bin/rake:19:in `load'
/Users/wejrowski/.rvm/gems/ruby-1.9.2-p180@global/bin/rake:19:in `<main>'

不知道下一步该做什么!

1 个答案:

答案 0 :(得分:1)

您的rake doc::app错误很可能是由于rake任务仅使用单个冒号(“:”)来分隔命名空间和任务名称。请尝试改为运行rake doc:app