Strange error when running bundle exec rspec spec

Hi

I have been following the online rails tutorial written by Micheal
Hartl, can be found here:

http://ruby.railstutorial.org/chapters/beginning#top

As I have been going through the chapters, at first the rspec tests were
running completely fine. One of the chapters suggests installing
blueprint stylesheet, which I did.

Somewhere after that, when I write rspec tests and run bundle exec rspec
spec, it all broke.

The followiung error is displaying in the stack trace, but I have no
idea why its pointing to the cucumber steps, and an undefined method
‘When’.

Im completely lost with this. Any help very much appreciated.

I have installed the cucumber gem, and tried a few other things, but as
of now, I have no ability to run rspec. :frowning:

C:/Users/brad/rails_projects/hartl_tutorial/sample_app/app/assets/stylesheets/joshuaclayton-blueprint-css-9bf9513/features/step_definitions/blueprint_steps.rb:1:in
<top (required)>': undefined methodWhen’ for main:Object
(NoMethodError)
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in
require' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:inblock in require’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:225:in
load_dependency' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:inrequire’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:348:in
require_or_load' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:302:independ_on’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:214:in
require_dependency' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:417:inblock (2 levels) in eager_load!’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:416:in
each' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:416:inblock in eager_load!’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:414:in
each' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:414:ineager_load!’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/application/finisher.rb:51:in
block in <module:Finisher>' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:30:ininstance_exec’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:30:in
run' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:55:inblock in run_initializers’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:54:in
each' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:54:inrun_initializers’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/application.rb:96:in
initialize!' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:inmethod_missing’
from
C:/Users/brad/rails_projects/hartl_tutorial/sample_app/config/environment.rb:5:in
<top (required)>' from C:/Users/brad/rails_projects/hartl_tutorial/sample_app/spec/spec_helper.rb:3:inrequire’
from
C:/Users/brad/rails_projects/hartl_tutorial/sample_app/spec/spec_helper.rb:3:in
<top (required)>' from C:/Users/brad/rails_projects/hartl_tutorial/sample_app/spec/controllers/pages_controller_spec.rb:1:inrequire’
from
C:/Users/brad/rails_projects/hartl_tutorial/sample_app/spec/controllers/pages_controller_spec.rb:1:in
<top (required)>' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:inload’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in
block in load_spec_files' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:inmap’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in
load_spec_files' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:18:inrun’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in
run_in_process' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:69:inrun’
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:in
`block in autorun’

C:\Users\brad\rails_projects\hartl_tutorial\sample_app>

I ran into this today but I presume snomys got through it. For others
whom may encounter:

Remove both the ‘features’ and ‘lib’ directories supplied with the
blueprint-css folder.

rm -r app/assets/stylesheets/blueprint-css-/{features,lib}/

Not a professional but I couldn’t see the use for either in this portion
of the hierarchy.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service