我正在 laravel 4 中创建一个应用程序/站点。我正在使用 laravel-guard 设置 Laravel,这有助于真正轻松地构建资产并创建模块化设置,以便您可以快速缩小 css 和 js。
我已经运行了正确的 ruby 版本等,这很酷。
当我运行命令php artisan guard:make
时它工作得很好但是当我尝试运行时
php artisan guard:watch
我在那里遇到了一些非常奇怪的错误,它们根本无法正常工作。
我得到的错误是:
17:21:54 - ERROR - Could not load 'guard/phpunit' or find class Guard::Phpunit
17:21:54 - ERROR - /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts'
> [#] /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:746:in `activate'
> [#] /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems.rb:212:in `rescue in try_activate'
> [#] /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems.rb:209:in `try_activate'
> [#] /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
> [#] /Users/mdunbavan/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/plugin_util.rb:100:in `plugin_class'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/plugin_util.rb:57:in `initialize_plugin'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard.rb:167:in `add_plugin'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/dsl.rb:166:in `guard'
> [#] /Freelance/Current Projects/knight-dragon/knightdragon/Guardfile:12:in `_instance_eval_guardfile'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/guardfile/evaluator.rb:121:in `instance_eval'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/guardfile/evaluator.rb:121:in `_instance_eval_guardfile'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/guardfile/evaluator.rb:37:in `evaluate_guardfile'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/setuper.rb:144:in `evaluate_guardfile'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/setuper.rb:62:in `setup'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/commander.rb:24:in `start'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/lib/guard/cli.rb:96:in `start'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/gems/guard-2.2.1/bin/guard:6:in `<top (required)>'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/bin/guard:19:in `load'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/bin/guard:19:in `<main>'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `eval'
> [#] /Users/mdunbavan/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `<main>'
17:21:54 - ERROR - Invalid Guardfile, original error is:
> [#] undefined method `superclass' for nil:NilClass
这是我的宝石列表中的内容:
guard (2.2.1, 1.4.0)
guard-coffeescript (1.3.4)
guard-concat (0.0.3)
guard-livereload (2.0.0)
guard-phpunit (0.1.4)
guard-sass (1.3.2)
我查看了我的宝石清单,它似乎在那里,所以我根本无法弄清楚。
有谁知道为什么会发生这种情况?