有防护和红宝石版本的问题

时间:2012-11-14 10:51:30

标签: ruby-on-rails rspec guard

我已将警卫和rb-notify一起添加到我的Gemfile并运行bundle:

gem 'guard-rspec', '1.2.1', :group => :test

gem 'rb-inotify', '0.8.8', :group => [:development, :test]
gem 'libnotify', '0.5.9', :group => [:development, :test]

然而,当我运行bundle exec spork时,我得到以下内容:

bundle exec guard
10:47:09 - INFO - Guard uses Libnotify to send notifications.
10:47:09 - INFO - Guard uses TerminalTitle to send notifications.
10:47:09 - INFO - Guard is now watching at '/home/paul/work/test-demo'
10:47:09 - INFO - Guard::RSpec is running, with RSpec 2!
10:47:09 - INFO - Running all specs
Running tests with args ["--drb", "-f", "progress", "-r", "/home/paul/.rvm/gems/ruby-1.9.2-p290@test-demo/gems/guard-rspec-1.2.1/lib/guard/rspec/formatters/notification_rspec.rb", "-f", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--failure-exit-code", "2", "spec"]...
Done.

/home/paul/.rvm/gems/ruby-1.9.2-p290@test-demo/gems/ffi-1.1.5/lib/ffi_c.so: [BUG] Segmentation fault
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]

Aborted

我猜测1.8.7和1.9.2的东西。我正在运行rvm和1.9.2。 ruby -v告诉我1.9.2然而seg故障似乎与1.8.7相关。

我的守卫文件非常简单:

guard 'rspec', :version => 2, :all_after_pass => false, :cli => '--drb' do
  watch(%r{^spec/.+_spec\.rb$})
  watch(%r{^lib/(.+)\.rb$})     { |m| "spec/lib/#{m[1]}_spec.rb" }
  watch('spec/spec_helper.rb')  { "spec" }

  # Rails example
  watch(%r{^app/(.+)\.rb$})                           { |m| "spec/#{m[1]}_spec.rb" }
  watch(%r{^app/(.*)(\.erb|\.haml)$})                 { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
  watch(%r{^app/controllers/(.+)_(controller)\.rb$})  { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] 
  watch(%r{^spec/support/(.+)\.rb$})                  { "spec" }
  watch('config/routes.rb')                           { "spec/routing" }
  watch('app/controllers/application_controller.rb')  { "spec/controllers" }

  # Capybara request specs
  watch(%r{^app/views/(.+)/.*\.(erb|haml)$})          { |m| "spec/requests/#{m[1]}_spec.rb" }

end

我可能出错的任何想法? 编辑:奇怪的是,当我改为使用Ruby 1.8.7时,它可以工作(在更改了许多依赖于1.9.2的其他宝石/代码之后)。我仍然想使用更新版本的ruby,但

0 个答案:

没有答案