您的帮助将不胜感激。我是编程新手,想尝试启动 alexch 的 Learn_Ruby,但我坚持第一课:00_hello。我正在运行“rake”测试,出现奇怪的错误:
Justins-MacBook-Pro:00_hello Justin$ rake
(in /Users/Justin/Desktop/learn_ruby-master)
rake aborted!
undefined method `gem' for main:Object
/Users/Justin/Desktop/learn_ruby-master/Rakefile:2
(See full trace by running task with --trace)
我只是按照课程中的说明进行操作:https ://github.com/alexch/learn_ruby/blob/master/index.html
这是我的规格: ruby 1.8.7 rspec 2.12 gem 1.8.25
还有什么我想念的吗??非常感谢您的帮助。
这是宝石清单:
Justins-MacBook-Pro:00_hello Justin$ gem list
*** LOCAL GEMS ***
activemodel (3.2.11)
activerecord (3.2.11)
activesupport (3.2.11)
arel (3.0.2)
builder (3.1.4, 3.0.4)
diff-lcs (1.2.0, 1.1.3)
i18n (0.6.1)
multi_json (1.5.0)
rspec (2.12.0)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
rspec-mocks (2.12.2)
rubygems-update (1.8.25)
tzinfo (0.3.35)
uuidtools (2.1.3)