Cucumber tmbundle 的运行命令失败并显示“文件未找到”错误

发布于 2024-10-16 12:17:51 字数 1298 浏览 6 评论 0原文

Gemfile

source 'http://rubygems.org'

gem 'rails', '3.0.3'

gem 'sqlite3-ruby', :require => 'sqlite3'
group :development, :test do
  gem "rspec-rails", ">= 2.0.0" 
  gem "cucumber-rails", ">= 0.3.2" 
  gem "webrat", ">= 0.7.2"
end

我在功能文件上使用“运行功能”命令,得到:

错误输出:

/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in gem_original_require':没有这样的文件 加载--/Volumes/Macintosh HD/Users/christian/Projects/siteroot/.bundle/environment (加载错误)来自 /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:inrequire' 来自 /Volumes/Macintosh HD/用户/基督教/图书馆/应用程序 支持/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/../mate.rb:10 从 /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in gem_original_require'来自 /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:inrequire' 来自 /Volumes/Macintosh HD/用户/基督教/图书馆/应用程序 支持/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/feature_helper.rb:1 从 /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in gem_original_require'来自 /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:inrequire' 来自/tmp/cucumber-9776.rb:2

Gemfile

source 'http://rubygems.org'

gem 'rails', '3.0.3'

gem 'sqlite3-ruby', :require => 'sqlite3'
group :development, :test do
  gem "rspec-rails", ">= 2.0.0" 
  gem "cucumber-rails", ">= 0.3.2" 
  gem "webrat", ">= 0.7.2"
end

I use the "Run Feature" command on a feature file and I get:

Error output:

/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
gem_original_require': no such file to
load -- /Volumes/Macintosh
HD/Users/christian/Projects/siteroot/.bundle/environment
(LoadError) from
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:inrequire'
from /Volumes/Macintosh
HD/Users/christian/Library/Application
Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/../mate.rb:10
from
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
gem_original_require' from
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:inrequire'
from /Volumes/Macintosh
HD/Users/christian/Library/Application
Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/feature_helper.rb:1
from
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
gem_original_require' from
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:inrequire'
from /tmp/cucumber-9776.rb:2

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迎风吟唱 2024-10-23 12:17:51

从那时起,我发现切换到 drnick git://github.com/drnic/cucumber-tmbundle.git 的 fork 以及使用 RVM for ruby​​ 已经神奇地解决了我的问题。

话虽如此,我发现 cucumber 命令生成的运行报告确实很难看。我期待一些更接近 Rspec 捆绑包产生的东西。我的可能仍然坏了,但我已经放弃了,只是像上帝的意图一样切换回从命令行运行黄瓜。

I've since found that switching to the fork by drnick git://github.com/drnic/cucumber-tmbundle.git as well as using RVM for ruby has magically fixed my problems.

Having said that I've discovered that run report that is produced by the cucumber command is really ugly. I was expecting something closer to what the Rspec bundle produces. Mine might still be broken but I've given up and just switched back to running cucumber from the command line like God intended.

习ぎ惯性依靠 2024-10-23 12:17:51

您有可能使用 Ruby 1.9.x 进行开发吗?看起来 Cucumber 正在尝试使用 1.8。尝试一下让 Textmate 识别 Ruby 版本升级

Any chance you are using Ruby 1.9.x for development? It looks like Cucumber is trying to use 1.8. Give this a go Getting Textmate to recognize Ruby version upgrade

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文