jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

undefined method 'configure' for Teaspoon:Module #380

Closed dancancro closed 9 years ago

dancancro commented 9 years ago

I'm walking through a Rails-Angular tutorial and hit a snag with teaspoon. I posted an issue to that repo a couple days ago and thought perhaps someone following this repo would be available to look into it.

Here is the error:

// ♥ rake teaspoon
rake aborted!
NoMethodError: undefined method `configure' for Teaspoon:Module
/Users/Dan/work/angular-rails/receta/spec/teaspoon_env.rb:1:in `<top (required)>'
/Users/Dan/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require'
/Users/Dan/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `block in require'
/Users/Dan/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:240:in `load_dependency'
/Users/Dan/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require'
/Users/Dan/.rvm/gems/ruby-2.2.2/gems/teaspoon-0.7.9/lib/teaspoon/environment.rb:40:in `require_env'
/Users/Dan/.rvm/gems/ruby-2.2.2/gems/teaspoon-0.7.9/lib/teaspoon/environment.rb:23:in `block in require_environment'
/Users/Dan/.rvm/gems/ruby-2.2.2/gems/teaspoon-0.7.9/lib/teaspoon/environment.rb:21:in `each'
/Users/Dan/.rvm/gems/ruby-2.2.2/gems/teaspoon-0.7.9/lib/teaspoon/environment.rb:21:in `require_environment'
/Users/Dan/.rvm/gems/ruby-2.2.2/gems/teaspoon-0.7.9/lib/teaspoon/environment.rb:7:in `load'
/Users/Dan/.rvm/gems/ruby-2.2.2/gems/teaspoon-0.7.9/lib/teaspoon/console.rb:12:in `initialize'
/Users/Dan/.rvm/gems/ruby-2.2.2/gems/teaspoon-0.7.9/lib/tasks/teaspoon.rake:5:in `new'
/Users/Dan/.rvm/gems/ruby-2.2.2/gems/teaspoon-0.7.9/lib/tasks/teaspoon.rake:5:in `block in <top (required)>'
Tasks: TOP => teaspoon
(See full trace by running task with --trace)

and my sourcecode repo is here.

Thank you

jejacks0n commented 9 years ago

it looks like teaspoon isn't being required -- like by bundle exec, or binstubs -- highly depends on your setup though.

dancancro commented 9 years ago

Sorry, I'm new to this. Could you point me in the right direction? I don't know what bundle exec or binstubs are.

I posted all the code to the repo. Do you see anything out of place?

My Gemfile has this part that looks like a requirement to me:

group :test, :development do
  gem "rspec"
  gem "rspec-rails"
  gem "factory_girl_rails"
  gem "capybara"
  gem "database_cleaner"
  gem "selenium-webdriver"
  gem 'teaspoon', "0.7.9"
  gem 'phantomjs'
end

The same problem happens with the tutorial's finished product, which is here

jejacks0n commented 9 years ago

We try to support up to two versions ago -- deprecation warnings etc. We went through version 8, 9, and we're currently at 1.0.x. I would hound the maintainers of the Rails-Angular to update it and resolve what you need.

As a guess, try pulling teaspoon out of the test/dev group.