Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/54.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 黄瓜特徵赢得';不要在狮子下面跑_Ruby On Rails_Cucumber_Osx Lion - Fatal编程技术网

Ruby on rails 黄瓜特徵赢得';不要在狮子下面跑

Ruby on rails 黄瓜特徵赢得';不要在狮子下面跑,ruby-on-rails,cucumber,osx-lion,Ruby On Rails,Cucumber,Osx Lion,因此,当我为Lion进行就地升级时,我的Macbook Pro上有几个rails应用程序具有cucumber功能 所以现在我已经重新安装了XCode,更新了我所有的gems,当我启动rails服务器时,一切看起来都很好。但是如果我运行cucumber features,我会得到以下结果: You have already activated rack 1.3.2, but your Gemfile requires rack 1.2.3. Consider using bundle exec.

因此,当我为Lion进行就地升级时,我的Macbook Pro上有几个rails应用程序具有cucumber功能

所以现在我已经重新安装了XCode,更新了我所有的gems,当我启动rails服务器时,一切看起来都很好。但是如果我运行
cucumber features
,我会得到以下结果:

You have already activated rack 1.3.2, but your Gemfile requires rack 1.2.3. 
Consider using bundle exec. (Gem::LoadError)

因此,我删除了Gemfile.lock以摆脱旧的gem列表,将Gemfile上的rails版本升级为新版本,并再次运行了
bundle install
,它做到了这一点。没有错误,但cucumber功能将不会在我的生命周期内运行。

您的环境很好,如果要执行gem二进制文件,您应该始终使用bundle exec,在这种情况下,它将始终启动Gemfile中声明的版本的可执行文件,在另一种情况下,如果没有bundle exec,它将从系统中安装的版本启动二进制文件,有时它们可能匹配(但这只是巧合)

将类似的内容添加到您的配置文件中,以避免长时间的命令调用:


alias bec='bundle exec cucumber-r features'

您是否考虑过使用
bundle exec cumber
而不是运行
cumber
?:)我会试一试,但我也想找出我的环境出了什么问题