“cucumber:command not found”命令行错误; “芜菁黄瓜”工作正常 [英] "cucumber: command not found" error on command line; "rake cucumber" works fine though

查看:537
本文介绍了“cucumber:command not found”命令行错误; “芜菁黄瓜”工作正常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚更新我的黄瓜宝石在我的系统,并遇到了运行我的标记的黄瓜功能的问题。 cucumber命令不再在我的命令行上工作。

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

-bash: cucumber: command not found

初步想到我的$ PATH未设置在我的bash_login正确。在这里似乎是正确的,我想:

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:/ usr / :/var/lib/gems/1.8/bin:/ usr / X11R6 / bin

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.

推荐答案

您从bash获取的错误消息以及 which cucumber 不给任何输出指示黄瓜可执行文件不在您的路径上。通过运行 gem env 检查RubyGems路径,并相应地更新操作系统路径。

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.

这篇关于“cucumber:command not found”命令行错误; “芜菁黄瓜”工作正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆