开发者

cucumber on windows - command not found

开发者 https://www.devze.com 2023-03-28 18:32 出处:网络
I\'m trying to get started with testing in Ruby on Windows, and I have the gems installed for cucumber

I'm trying to get started with testing in Ruby on Windows, and I have the gems installed for cucumber

capybara (1.0.0, 0.4.1.1)
cucumber (0.10.2)
cucumber-rails (0.4.1)
rspec (2.6.0)
rspec-rails (2.6.1)
webrat (0.7.3)

I wrote my first feature, but when I try to run

cucumber features -n

I get an error 'cucumber' is not a recognized internal or external command, operable program or batch file.

How do you r开发者_运维技巧un cucumber tests under windows? I'm running Ruby 1.9.2 and rails 3.0.0


I had the same issue as you. The solution was to add the bin folder of the cucumber gem in the PATH environment variable:

<path_to_jruby>\lib\ruby\gems\1.8\gems\cucumber-1.2.1\bin

This seams to be a windows related issue. Not sure why but it resolved the problem. Hope it helps.


Using bundle exec cucumber features -n should work.

Edit: Or maybe rake cucumber


There are few gotchas under windows like missing "a" character or no colored output but you should be able to use cucumber under windows just fine.

Try to setup cucumber again. Maybe you missed soemthing during setup. If that does not help, you could try to play with http://cygwin.com/index.html

0

精彩评论

暂无评论...
验证码 换一张
取 消