Skip to content

Problems running `guard init` #283

Closed
ashleyconnor opened this Issue Jun 2, 2012 · 7 comments

4 participants

@ashleyconnor

I'm trying to setup Guard using this tutorial, however when I run bundle exec guard init or bundle exec guard init rspec

I'm on OSX 10.7.4, running RVM 1.14.1 and Rails 3.2.5.

I get the following errors:

[myapplication]$ bundle exec guard init rspec
/Users/ash/.rvm/gems/ruby-1.9.2-p290@myapplication/gems/guard-1.1.0/lib/guard/cli.rb:145:in `init': undefined method `create_guardfile' for Guard:Module (NoMethodError)
    from /Users/ash/.rvm/gems/ruby-1.9.2-p290@myapplication/gems/thor-0.15.2/lib/thor/task.rb:27:in `run'
    from /Users/ash/.rvm/gems/ruby-1.9.2-p290@myapplication/gems/thor-0.15.2/lib/thor/invocation.rb:120:in `invoke_task'
    from /Users/ash/.rvm/gems/ruby-1.9.2-p290@myapplication/gems/thor-0.15.2/lib/thor.rb:275:in `dispatch'
    from /Users/ash/.rvm/gems/ruby-1.9.2-p290@myapplication/gems/thor-0.15.2/lib/thor/base.rb:408:in `start'
    from /Users/ash/.rvm/gems/ruby-1.9.2-p290@myapplication/gems/guard-1.1.0/bin/guard:6:in `<top (required)>'
    from /Users/ash/.rvm/gems/ruby-1.9.2-p290@myapplication/bin/guard:19:in `load'
    from /Users/ash/.rvm/gems/ruby-1.9.2-p290@myapplication/bin/guard:19:in `<main>'

RSpec runs fine:

[myapplication]$ bundle exec rspec
F

Failures:

  1) StaticPages GET /static_pages works! (now write some real specs)
     Failure/Error: get static_pages_index_path
     NameError:
       undefined local variable or method `static_pages_index_path' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x007fd6d176a020>
     # ./spec/requests/static_pages_spec.rb:7:in `block (3 levels) in <top (required)>'

Finished in 0.00887 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/requests/static_pages_spec.rb:5 # StaticPages GET /static_pages works! (now write some real specs)

Also my gemfile:

source 'https://rubygems.org'
gem 'rails', '3.2.5'
group :development, :test do
  gem 'rspec-rails'
  gem 'guard-rspec'
  gem 'growl'
  gem 'rb-fsevent'
  gem 'spork-rails'
  gem 'guard-spork'
end
gem 'sqlite3'
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'
@rymai
Guard member
rymai commented Jun 2, 2012
@TMorgan99

I reverted to 1.1, which rolled back thor to 0.14.6 -- this could be related?

@rymai rymai added a commit that closed this issue Jun 3, 2012
@rymai rymai Fix #283 (`guard init`) 8d751fb
@rymai rymai closed this in 8d751fb Jun 3, 2012
@rymai
Guard member
rymai commented Jun 3, 2012

Ok, it should be fixed now. Could you confirm it's fixed by using Guard from the master branch?

@mikz
mikz commented Jun 3, 2012

Works for me (master branch).

@ashleyconnor

Altered gem file to gem 'guard', :git => 'git://github.com/guard/guard.git' and confirmed working!

Thank you for the quick turn-around.

@rymai
Guard member
rymai commented Jun 3, 2012

Nice, thanks for the feedback, I've just released 1.1.1!

@TMorgan99

OK Thanks! -- I can now run with 1.1.1 and thor 0.15.2, but now I get all the deprecation notes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.