これに対する解決策は見つかりませんでした。require: cannot load such file -- guard/guard (LoadError)
Rails サーバーを起動しようとすると、エラーが発生します。
ruby -v
ruby 2.1.2p95 (2014-05-08) [x86_64-linux-gnu]
rails -v
Rails 4.2.0
gem -v
2.2.2
それが私の宝石ファイルです:
[...]
group :development, :test do
gem "pry-rails"
# Guard
gem 'guard-rspec'
gem 'guard-spinach'
# Testing
gem 'minitest'
gem 'turn'
gem 'capybara'
gem 'rspec-rails'
gem 'spinach-rails'
gem 'libnotify'
gem 'awesome_print'
# Spring bindings
gem 'spring'
gem 'spring-commands-rspec'
gem 'spring-commands-spinach'
end
[...]
そして、開発サーバーの実行は機能しません:
rails server
/home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/guard-spinach-0.0.3/lib/guard/spinach.rb:2:in `require': cannot load such file -- guard/guard (LoadError)
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/guard-spinach-0.0.3/lib/guard/spinach.rb:2:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/bundler-1.8.2/lib/bundler/runtime.rb:85:in `require'
from /var/lib/gems/2.1.0/gems/bundler-1.8.2/lib/bundler/runtime.rb:85:in `rescue in block in require'
from /var/lib/gems/2.1.0/gems/bundler-1.8.2/lib/bundler/runtime.rb:68:in `block in require'
from /var/lib/gems/2.1.0/gems/bundler-1.8.2/lib/bundler/runtime.rb:61:in `each'
from /var/lib/gems/2.1.0/gems/bundler-1.8.2/lib/bundler/runtime.rb:61:in `require'
from /var/lib/gems/2.1.0/gems/bundler-1.8.2/lib/bundler.rb:134:in `require'
from /home/sl/Dev/nexis-development-kit/nexis/config/application.rb:15:in `<top (required)>'
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
ただし、コメントアウトする#gem 'guard-spinach'
と正常に動作します。
を使用して宝石をインストールしましたbundle install --path vendor/bundle