Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadError: cannot load such file #734

Closed
jonmchan opened this issue Jan 28, 2015 · 16 comments
Closed

LoadError: cannot load such file #734

jonmchan opened this issue Jan 28, 2015 · 16 comments

Comments

@jonmchan
Copy link

Hi all,

I'm not really sure if this is a proper issue, but after upgrading ruby in my rails project to 2.1.4, I no longer am able to run the project through rails s, rails c, or any rake tasks. Everything worked fine in 2.1.2.

Here's the error I keep getting:

$ rake db:drop db:create db:migrate
rake aborted!
LoadError: cannot load such file -- guard/guard
/Users/jonathan/code/sirius/config/application.rb:14:in `<top (required)>'
/Users/jonathan/code/sirius/Rakefile:4:in `<top (required)>'
LoadError: cannot load such file -- guard-spring
/Users/jonathan/code/sirius/config/application.rb:14:in `<top (required)>'
/Users/jonathan/code/sirius/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

I'm on OSX, ruby installed via rbenv. I'm running Gemfile.lock says guard is at 2.11.1. Any help on this issue appreciated.

@e2
Copy link
Contributor

e2 commented Jan 28, 2015

  1. Just remove guard-spring from your Gemfile and Guardfile.
  2. Then upgrade guard-rspec (run bundle update guard-rspec)
  3. Setup guard-rspec to use spring (see this: https://github.com/guard/guard-rspec#options)

Explanation:
guard-spring is not updated to work with newer versions of Guard, but it's not even necessary anymore, since guard-rspec supports spring.

@e2 e2 closed this as completed Jan 28, 2015
@jonmchan
Copy link
Author

Thanks! Everything works again after that.

mkasztelnik added a commit to dice-cyfronet/atmosphere that referenced this issue Feb 13, 2015
@Lujaw
Copy link

Lujaw commented May 20, 2015

thanks, it worked

@ElminDmitry
Copy link

don't works. i don't have guard-spring in Gemfile and Guardfile. steps 2, 3 don't help

@e2
Copy link
Contributor

e2 commented Aug 18, 2015

@ElminDmitry - your problem may be different. If you have "guard/guard" in the message, you may be using some outdated Guard plugin.

Try "bundle exec rake (...)" instead - it may help to find the cause.

If you can, open a new issue, paste your Gemfile and Gemfile.lock (or at least bundle show output).

Or, you can try running guard -d - any errors there may help as well.

@ElminDmitry
Copy link

Problem appears after adding and installing gem 'guard-spork' gem 'childprocess'

@e2
Copy link
Contributor

e2 commented Aug 19, 2015

Guard-spork is outdated as far as I remember, so remove it and/or use guard-zeus or spring.

@ElminDmitry
Copy link

Thanks for help

@chenkirk
Copy link

The one that was outdated for me was guard-resque.

@scarver2
Copy link

scarver2 commented Dec 9, 2015

I had a similar issue with a legacy codebase. Here are the versions that worked for me to overcome the missing guard/guard requirement.

group :development do
  gem 'guard-rails', '0.7.2', require: false
  gem 'guard-rspec', '3.1.0', require: false
  gem 'guard-rubocop', '1.2.0', require: false
  gem 'guard-spork', '2.1.0', require: false
end

@datenimperator
Copy link

Same here today. I had to pin rspec to ' ~> 3.4.0' to solve it, after bundle update gave me rspec 3.5 beta3.

@lokeshreddy21
Copy link

I've just updated the guard gems versions, and it worked magic

@dennyluan
Copy link

anyone using guard-konacha, it seems to be no longer working for anyone also getting

LoadError: cannot load such file -- guard/guard

@scarver2
Copy link

@tastycakeman guard-konacha gem relies on Guard version 1. Change your gemfile to gem 'guard-konacha', github: 'lbeder/guard-konacha' which has an updated gemspec to support a newer version of Guard.

@pdagrawal
Copy link

When running rake db:create I am facing following error:

`rake aborted!

LoadError: cannot load such file -- guard/guard
/Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in require' /Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in block in require'
/Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in load_dependency' /Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in require'
/Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/gems/guard-migrate-1.0.4/lib/guard/migrate.rb:2:in <top (required)>' /Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/gems/bundler-1.16.0/lib/bundler/runtime.rb:95:in require'
/Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/gems/bundler-1.16.0/lib/bundler/runtime.rb:95:in rescue in block in require' /Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/gems/bundler-1.16.0/lib/bundler/runtime.rb:72:in block in require'
/Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/gems/bundler-1.16.0/lib/bundler/runtime.rb:65:in each' /Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/gems/bundler-1.16.0/lib/bundler/runtime.rb:65:in require'
/Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/gems/bundler-1.16.0/lib/bundler.rb:114:in require' /Users/macbookpro06/Desktop/projects/pradeep/ashley/oohmpv2/config/application.rb:7:in <top (required)>'
/Users/macbookpro06/Desktop/projects/pradeep/ashley/oohmpv2/Rakefile:5:in require' /Users/macbookpro06/Desktop/projects/pradeep/ashley/oohmpv2/Rakefile:5:in <top (required)>'
/Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/gems/rake-12.3.0/exe/rake:27:in <top (required)>' /Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/bin/ruby_executable_hooks:15:in eval'
/Users/macbookpro06/.rvm/gems/ruby-2.0.0-p247@oohmp-v2/bin/ruby_executable_hooks:15:in <main>' (See full trace by running task with --trace)

akio-outori added a commit to akio-outori/bettermeans that referenced this issue Feb 19, 2018
* downgrade rubygems to 1.8.30 for compat with rails, adjust rdoc and rake versions.

update Vagrantfile and .gitignore.

update Gemfile

* update README

* Resolve issues with guard/guard#734 and https://stackoverflow.com/questions/15079090/how-do-i-find-out-which-gem-has-a-specific-dependency

* resolve issues with faster_csv

* update vagrant file to include database setup.

* update README for vagrant changes.
akio-outori added a commit to akio-outori/bettermeans that referenced this issue Feb 19, 2018
* downgrade rubygems to 1.8.30 for compat with rails, adjust rdoc and rake versions.

update Vagrantfile and .gitignore.

update Gemfile

* update README

* Resolve issues with guard/guard#734 and https://stackoverflow.com/questions/15079090/how-do-i-find-out-which-gem-has-a-specific-dependency

* resolve issues with faster_csv

* update vagrant file to include database setup.

* update README for vagrant changes.

* Add utf-8 encoding

* bind to port 8080 on the host machine for testing.

* Remove ruby-debug, since this is deprecated in 1.9+
@emmanuellmhango
Copy link

I am new to ruby, but now its been 3days, failing to make it work on windows. my error:
rake db:create
rake aborted!
LoadError: cannot load such file -- /mnt/c/code/myapp/config/application
/mnt/c/code/myapp/rakefile:4:in require_relative' /mnt/c/code/myapp/rakefile:4:in <top (required)>'
(See full trace by running task with --trace)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests