“cucumber: command not found” error on command lin

2020-03-31 08:27发布

Just updated my cucumber gems on my system and have run into an issue with running my tagged cucumber features. The "cucumber" command no longer works on my command line.

-bash: cucumber: command not found

Initial thought was that my $PATH wasn't set up in my bash_login properly. All seems correct here though, i think:

echo $PATH /opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin:/usr/local/bin:/opt/local/bin:/usr/local/sbin:/var/lib/gems/1.8/bin:/usr/X11R6/bin

The bit to add is that the cucumber rake task runs, but as you know it runs all of the tests for my application. And writing out the specific location for a feature each time i want to run it is a bit of a chore, hence why i am keen to have my cucumber tags working again.

Any thoughts or tips would be hugely appreciated thanks.

1条回答
Lonely孤独者°
2楼-- · 2020-03-31 08:47

The error message you're getting from bash and the fact that which cucumber doesn't give any output indicates that the cucumber executable is not on your path. Check the RubyGems path by running gem env and update your operating system path accordingly.

查看更多
登录 后发表回答