开发者

The run command of the Cucumber tmbundle fails with "file not found" error

开发者 https://www.devze.com 2023-02-09 08:22 出处:网络
Gemfile source \'http://rubygems.org\' gem \'rails\', \'3.0.3\' gem \'sqlite3-ruby\', :require => \'sqlite3\'

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.开发者_StackOverflowrb: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


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消