pedalpete
pedalpete

Reputation: 21556

cucumber on windows - command not found

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 run cucumber tests under windows? I'm running Ruby 1.9.2 and rails 3.0.0

Upvotes: 0

Views: 2270

Answers (3)

Bruno Cardoso
Bruno Cardoso

Reputation: 41

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.

Upvotes: 4

socjopata
socjopata

Reputation: 5095

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

Upvotes: 0

Cydonia7
Cydonia7

Reputation: 3836

Using bundle exec cucumber features -n should work.

Edit: Or maybe rake cucumber

Upvotes: 0

Related Questions