Getting uninitialized constant Guard::Plugin when running guard with guard-cucmber

68 views
Skip to first unread message

Muhammad Al-Syrwan

unread,
Dec 16, 2014, 5:12:24 AM12/16/14
to guar...@googlegroups.com
Greetings,

I'm getting the following error 
uninitialized constant Guard::Plugin (Load Error) in file "guard-cucumber/guard/cucumber/notification_formatter.rb"
So for testing/debugging the problem i went to the file above and added
require 'guard'

Problem 1 solved but i got then same error for another module
uninitialized constant Guard::Compat (Load Error) in the same file

Then added the following line to the file
require 'guard/compat/plugin'

Problem solved now, but solved the wrong way, any one knows why the file 'notification_formatter.rb' cant access its dependencies ? any solution ?


Test & dev section of my gem file
group :test do
  gem
'shoulda-matchers'
  gem
'cucumber-rails', require: false
  gem
'database_cleaner'
  gem
'selenium-webdriver'
end


group :development, :test do
  gem
'rspec-rails', '~> 2.0'
  gem
'factory_girl_rails'
  gem
'meta_request' # used for rails panel chrome debugging extension
  gem
'rails-footnotes', '~> 4.0'
  gem
"better_errors"
  gem
"binding_of_caller"
  gem
'rspec-autotest'
  gem
'autotest-rails'
  gem
'launchy'
end


group :development do
  gem
'guard', '>=2.1.0'
  gem
'guard-rails'
  gem
'guard-rspec', require: false
  gem
'guard-cucumber'
end


Cucumber Section of my Guard file

guard "cucumber", cli: '-c' do
  watch
(%r{^features/.+\.feature$})
  watch
(%r{^features/support/.+$})          { "features" }


  watch
(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
   
Dir[File.join("**/#{m[1]}.feature")][0] || "features"
 
end
end

Thanks in advance.

Cezary Baginski

unread,
Dec 17, 2014, 9:27:44 AM12/17/14
to guar...@googlegroups.com
Hi! I just released guard-cucumber 1.5.3

Thanks so much for reporting this! I've also activated the "issues" in the guard-cucumber repository - so if there are any future problem, just add an issue there.

Thanks again and have a nice day!

Muhammad Al-Syrwan

unread,
Dec 17, 2014, 10:47:47 AM12/17/14
to guar...@googlegroups.com
Awesome, it worked. 

Thanks very much for the quick fix.

Cezary Baginski

unread,
Dec 21, 2014, 1:20:42 PM12/21/14
to guar...@googlegroups.com
Sure, glad to help!
Reply all
Reply to author
Forward
0 new messages