I had a running app with no problem and just did bundle update and bundle install and now. I had not bundle updated for the past 4 months I think.
and now when I run $ guard, I have this error: ERROR - Could not load 'guard/rails-assets' or' ' find class Guard::RailsAssets
I don't understand where this bug comes from: I assume it is the bundle update that caused the issue as 10 minutes before I had no problem but i am not 100% sure.
mathieu-To-be-filled-by-O-E-M:~/rails_projects/mathieu_app$ guard
17:30:40 - ERROR - Could not load 'guard/rails-assets' or' ' find class Guard::RailsAssets
17:30:40 - ERROR - Error is: cannot load such file -- guard/guard
17:30:40 - ERROR - /home/mathieu/.rvm/gems/ruby-2.0.0-p451@global/gems/guard-rails-assets-0.1.5/lib/guard/rails-assets.rb:2:in `require'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@global/gems/guard-rails-assets-0.1.5/lib/guard/rails-assets.rb:2:in `<top (required)>'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/plugin_util.rb:105:in `require'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/plugin_util.rb:105:in `rescue in plugin_class'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/plugin_util.rb:97:in `plugin_class'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/plugin_util.rb:56:in `initialize_plugin'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/internals/plugins.rb:24:in `add'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/dsl.rb:186:in `block in guard'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/dsl.rb:183:in `each'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/dsl.rb:183:in `guard'
> [#] /home/mathieu/rails_projects/mathieu_app/Guardfile:37:in `evaluate'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/dsl.rb:378:in `instance_eval'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/dsl.rb:378:in `evaluate'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/guardfile/evaluator.rb:91:in `evaluate'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard.rb:155:in `_evaluate'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard.rb:60:in `setup'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/commander.rb:32:in `start'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/cli.rb:243:in `_start'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/cli.rb:108:in `start'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/aruba_adapter.rb:32:in `execute'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/lib/guard/aruba_adapter.rb:19:in `execute!'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/guard-2.10.1/bin/guard:11:in `<top (required)>'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/bin/guard:23:in `load'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/bin/guard:23:in `<main>'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/bin/ruby_executable_hooks:15:in `eval'
> [#] /home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/bin/ruby_executable_hooks:15:in `<main>'
17:30:40 - ERROR - Invalid Guardfile, original error is:
> [#]
> [#] Could not load class: "RailsAssets",
> [#] backtrace:
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/plugin_util.rb:57:in `initialize_plugin'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/internals/plugins.rb:24:in `add'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/dsl.rb:186:in `block in guard'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/dsl.rb:183:in `each'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/dsl.rb:183:in `guard'
> [#] (dsl)> ./Guardfile:37:in `evaluate'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/dsl.rb:378:in `instance_eval'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/dsl.rb:378:in `evaluate'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/guardfile/evaluator.rb:91:in `evaluate'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard.rb:155:in `_evaluate'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard.rb:60:in `setup'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/commander.rb:32:in `start'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/cli.rb:243:in `_start'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/cli.rb:108:in `start'
> [#] (dsl)> $GEM_PATH[0]/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
> [#] (dsl)> $GEM_PATH[0]/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
> [#] (dsl)> $GEM_PATH[0]/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
> [#] (dsl)> $GEM_PATH[0]/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/aruba_adapter.rb:32:in `execute'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/aruba_adapter.rb:19:in `execute!'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/bin/guard:11:in `<top (required)>'
> [#] (dsl)> $GEM_PATH[0]/bin/guard:23:in `load'
> [#] (dsl)> $GEM_PATH[0]/bin/guard:23:in `<main>'
> [#] (dsl)> $GEM_PATH[0]/bin/ruby_executable_hooks:15:in `eval'
EDIT
I am now getting a new type of error : see here
Guard::RailsAssets
is an old gem and I've sent a pull request for this here: https://github.com/dnagir/guard-rails-assets/pull/28In case you don't want to wait for a release, you can simply put this in your
Gemfile
:If you have any issues with this, comment on the Pull Request above.
Cheers