0

Didn't find any solution for this. I'm getting require: cannot load such file -- guard/guard (LoadError) error when i'm trying to start rails server.

ruby -v
ruby 2.1.2p95 (2014-05-08) [x86_64-linux-gnu]

rails -v
Rails 4.2.0

gem -v
2.2.2

That's my gem file:

[...]
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
[...]

And running dev server does not work:

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>'

When i comment out #gem 'guard-spinach' it works fine, though.

I've installed my gems using bundle install --path vendor/bundle

plunntic iam
  • 964
  • 1
  • 9
  • 18

1 Answers1

0

No simple answer for this one.

I figured out some versions setup. Probably, that's not the best one, but it works.

group :development, :test do
  gem 'pry-rails'

  # Guard
  gem 'guard', '~> 2.2.4'
  gem 'guard-rspec', '~> 4.2.0'
  gem 'guard-spinach', '~> 0.0.2'
  gem 'rspec-rails', '~> 2.99'
  gem 'spinach-rails', '~> 0.2.1'

  # Testing
  gem 'minitest'
  gem 'turn'
  gem 'capybara'
  gem 'libnotify'
  gem 'awesome_print'

  # Spring bindings
  gem 'spring'
  gem 'spring-commands-rspec'
  gem 'spring-commands-spinach'
end
plunntic iam
  • 964
  • 1
  • 9
  • 18