【发布时间】:2011-03-16 15:04:50
【问题描述】:
我在让 Rake 在我的机器上工作时遇到问题。这只发生在从 Rubygems 安装的 Rake 版本(不是 Debian 安装的版本)中。见上图:
charlotte:~# which rake
/var/lib/gems/1.8/bin//rake
charlotte:~# rake
/var/lib/gems/1.8/bin/rake:17: undefined method `require_gem' for main:Object (NoMethodError)
charlotte:~# rake -v
/var/lib/gems/1.8/bin/rake:17: undefined method `require_gem' for main:Object (NoMethodError)
charlotte:~# gem -v
1.6.2
charlotte:~# ruby --version
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
charlotte:~# gem list | grep rake
rake (0.8.7)
charlotte:~# /usr/bin/rake
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2377:in `raw_load_rakefile'
(See full trace by running task with --trace)
charlotte:~#
【问题讨论】: