Rails 3 -- Rspec
in my rails3 app I have installed rspec. But when I run the rspec command in my console it gives the following error.
C:\myapp>rspec spec
'rspec' is not recognized as an internal or external command,
operable program or batch file开发者_开发知识库.
Please Help.
Thanks in Advance.
You can try
bundle exec rspec spec
It doesnt solve the root problem, but is a quick work-around
EDIT: Did a bit of googling for you, have you tried this? http://getsatisfaction.com/railstutorial/topics/rspec_command_not_found#reply_4313182
You need to add the ruby gems directory to your PATH environment variable.
For me this is "C:\Program Files\Ruby192\lib\ruby\gems", but this will vary depending on version and install directory. You can add it to your PATH variable by going to Computer > System Properties > Advanced System Settings > Environment Variable > Path > Edit. Make sure you don't wipe the existing contents. Instead, add a semi-colon and paste the gems path in.
Good luck.
I did this and it worked
C:\OSS\InSpects>PATH=C:\Ruby192\lib\ruby\gems\1.9.1\bin;C:\Ruby192\bin
精彩评论