[英]Difficulty installing RSpec on Windows
I'm trying to get started with RSpec. 我正在尝试使用RSpec。 I already had Ruby 1.8.7 installed on my Windows 7 machine.
我已经在我的Windows 7机器上安装了Ruby 1.8.7。
So I typed gem install rspec
and that seemed to work. 所以我输入了
gem install rspec
,这似乎有效。 But if I type spec
in the command line, the command is not found. 但是如果我在命令行中键入
spec
,则找不到该命令。 My path currently includes the bin
folder in my RUBY_HOME
. 我的路径当前包含我的
RUBY_HOME
的bin
文件夹。
If I look into the C:\\Users\\Eric\\.gem\\specs\\rubygems.org%80\\quick\\Marshal.4.8
directory, I do see four RSpec files such as rspec-core-2.5.0.gemspec
. 如果我查看
C:\\Users\\Eric\\.gem\\specs\\rubygems.org%80\\quick\\Marshal.4.8
目录,我会看到四个RSpec文件,例如rspec-core-2.5.0.gemspec
。 Nevertheless, the spec
command fails even in this directory. 然而,即使在此目录中,
spec
命令也会失败。
What needs to be done to install RSpec correctly? 需要做什么才能正确安装RSpec? It would seem like a path issue, but I have been unable to find a directory where the
spec
command works, so I can't figure what to add to my path. 这看起来像路径问题,但是我无法找到
spec
命令工作的目录,所以我无法确定要添加到路径中的内容。
在Windows上,尝试此bundle exec rspec spec
在RSpec 2中没有spec
命令。尝试rake spec
或rspec spec
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.