“黄瓜:找不到命令"命令行错误;“耙黄瓜"虽然工作正常 [英] "cucumber: command not found" error on command line; "rake cucumber" works fine though

查看:24
本文介绍了“黄瓜:找不到命令"命令行错误;“耙黄瓜"虽然工作正常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚在我的系统上更新了我的 Cucumber Gems,但在运行我的标记 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: 找不到命令

-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:

回显 $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

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.

推荐答案

你从 bash 得到的错误信息以及 which cucumber 没有给出任何输出的事实表明 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.

这篇关于“黄瓜:找不到命令"命令行错误;“耙黄瓜"虽然工作正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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