1

Gemfile に rb-notify とともにガードを追加し、バンドルを実行しました。

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 -v1.9.2と教えてくれますが、セグフォルトは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 に依存する他の多くの宝石/コードを変更した後)。私はまだ新しいバージョンのルビーを使いたいと思っています

4

0 に答える 0