レーキの使用に問題があります。私はrspecの紹介であるこのコースに取り組んでいます。最初にrspecをインストールするように指示されているので、geminstallrspecと入力します。
ruby 1.9.3p385 (2013-02-06) [i386-mingw32]
C:\Users\Edub>gem install rspec
Successfully installed rspec-2.13.0
1 gem installed
次に、cd learn_ruby、次にcd 00_helloのコースディレクトリに入るはずですが、cd learn_ruby-master \ learn_ruby-master\00_helloと入力した場合にのみ機能します。
C:\Users\Edub>cd learn_ruby-master\learn_ruby-master\00_hello
次に、指示どおりにrakeを使用しようとすると、エラーが発生します。どういう意味かよくわかりません。
C:\Users\Edub\learn_ruby-master\learn_ruby-master\00_hello>rake
(in C:/Users/Edub/learn_ruby-master/learn_ruby-master)
You must use ANSICON 1.31 or later (http://adoxa.3eeweb.com/ansicon/) to use
col
our on Windows
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in
'require': cannot load such file -- hello (LoadError)
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir
e.rb:45:in `require'
from C:/Users/Edub/learn_ruby-master/learn_ruby-master/00_hello/hello_sp
ec.rb:116:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.0/lib/rspec/cor
e/configuration.rb:819:in `load'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.0/lib/rspec/cor
e/configuration.rb:819:in `block in load_spec_files'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.0/lib/rspec/cor
e/configuration.rb:819:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.0/lib/rspec/cor
e/configuration.rb:819:in `load_spec_files'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.0/lib/rspec/cor
e/command_line.rb:22:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.0/lib/rspec/cor
e/runner.rb:80:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.0/lib/rspec/cor
e/runner.rb:17:in `block in autorun'
rake aborted!
C:/Ruby193/bin/ruby.exe -S rspec C:/Users/Edub/learn_ruby-master/learn_ruby-
master/00_hello/hello_spec.rb -IC:/Users/Edub/learn_ruby-master/learn_ruby-
master/00_hello -IC:/Users/Edub/learn_ruby-master/learn_ruby-
master/00_hello/solution -fdocumentation -r ./rspec_config failed
Tasks: TOP => default => spec
(See full trace by running task with --trace)
コースでは、エラーが発生するはずであり、次のようになっていると思われます。
no such file to load -- test-first-teaching/hello/hello (LoadError)
わかりました。次に、hello.rbという名前のテキストエディタでメソッドを定義する必要があることを指示します。コードは次のようになります。
def hello
"Hello!"
end
それで、私は指示に進み、Sublime2でこれをすべて行います。Sublime2hello.rbでプログラムにタイトルを付け、メソッドを定義します。これですべてのエラーが修正されるはずですが、最初から行ったのと同じ長いエラーがまだあります。
誰かがここで何が起こっているのか、そしてなぜレーキが中止されたのか教えてもらえますか?ここで何を伝えようとしているのかわかりません。ありがとう!私が十分に具体的でなかったならば、ただ私に知らせてください。