Issue running rspec tests from Rails Tutorial

I am new to both Rails and Ruby Mine.  I have been working my way through the ruby on raills tutorial book (I am in chapter 5).  Although I have a VM with Ubuntu, I would like to stay in Windows; Ruby mine seems to be a nice way to do that.

I have the IDE installed and have opened my project, so far, so good.  However, when I try to run the tests (which are rspec tests), I get the following:

Running specs...

Command line:

["C:\\Ruby192\\bin\\ruby.exe", "-e", "$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)", "C:\\Ruby192\\bin/rspec", "--require", "teamcity/spec/runner/formatter/teamcity/formatter", "--format", "Spec::Runner::Formatter::TeamcityFormatter", "F:/LearningRuby/sample_app/spec/controllers/pages_controller_spec.rb", "F:/LearningRuby/sample_app/spec/requests/layout_links_spec.rb"]

C:\Ruby192\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:\Ruby192\bin/rspec --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter F:/LearningRuby/sample_app/spec/controllers/pages_controller_spec.rb F:/LearningRuby/sample_app/spec/requests/layout_links_spec.rb

C:/Ruby192/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.4-x86-mingw32/lib/nokogiri/nokogiri.rb:1:in `require': 127: The specified procedure could not be found.   - Init_nokogiri (LoadError)

C:/Ruby192/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.4-x86-mingw32/lib/nokogiri/1.9/nokogiri.so

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.4-x86-mingw32/lib/nokogiri/nokogiri.rb:1:in `<top (required)>'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.4-x86-mingw32/lib/nokogiri.rb:13:in `require'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.4-x86-mingw32/lib/nokogiri.rb:13:in `<top (required)>'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/webrat-0.7.1/lib/webrat.rb:2:in `require'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/webrat-0.7.1/lib/webrat.rb:2:in `<top (required)>'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.11/lib/bundler/runtime.rb:68:in `require'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.11/lib/bundler/runtime.rb:68:in `block (2 levels) in require'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.11/lib/bundler/runtime.rb:66:in `each'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.11/lib/bundler/runtime.rb:66:in `block in require'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.11/lib/bundler/runtime.rb:55:in `each'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.11/lib/bundler/runtime.rb:55:in `require'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.11/lib/bundler.rb:120:in `require'

 from F:/LearningRuby/sample_app/config/application.rb:7:in `<top (required)>'

 from F:/LearningRuby/sample_app/config/environment.rb:2:in `require'

 from F:/LearningRuby/sample_app/config/environment.rb:2:in `<top (required)>'

 from F:/LearningRuby/sample_app/spec/spec_helper.rb:3:in `require'

 from F:/LearningRuby/sample_app/spec/spec_helper.rb:3:in `<top (required)>'

 from F:/LearningRuby/sample_app/spec/controllers/pages_controller_spec.rb:1:in `require'

 from F:/LearningRuby/sample_app/spec/controllers/pages_controller_spec.rb:1:in `<top (required)>'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/configuration.rb:419:in `load'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/configuration.rb:419:in `block in load_spec_files'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/configuration.rb:419:in `map'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/configuration.rb:419:in `load_spec_files'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/command_line.rb:18:in `run'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/runner.rb:80:in `run_in_process'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/runner.rb:69:in `run'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/runner.rb:11:in `block in autorun'

C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/file_utils.rb:53:in `block in create_shell_runner': Command failed with status (1): [C:\Ruby192\bin\ruby.exe -e $stdout.sync=tr...] (RuntimeError)

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/file_utils.rb:45:in `call'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/file_utils.rb:45:in `sh'

 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/file_utils_ext.rb:36:in `sh'

 from D:/Program Files (x86)/JetBrains/RubyMine 3.1.1/rb/testing/runner/specs_in_folder_runner.rb:146:in `<top (required)>'

 from -e:1:in `load'

 from -e:1:in `<main>'


I would like to have my tests run and I am certain that I am doing something wrong, but I am so new at this, it is is hard to figure out where to start peeling the onion.  If I can get a nudge in the right direction, I would really appreciate it.

BTW - Here is the Gemfile for where I am at in the tutorial.

source 'http://rubygems.org'

gem 'rails', '3.0.7'

gem 'sqlite3-ruby', '1.3.2', :require => 'sqlite3'

group :development do

 gem 'rspec-rails'

end

group :test do

 gem 'rspec', '2.5.0'

 gem 'webrat', '0.7.1'

end

I have tried messing with different versions of the rspec and webrat gems, but it always seems to ground out on the nokogiri 1.4.4.  I have tried updating that to 1.4.4.1, but the windows bundler seems to trip over itself.
1 comment
Comment actions Permalink

I am not sure why this fixed it, but I edited my gemfile to remove the webrat reference, did a bundle update, re-added the reference, did another bundle update.

And now, I can run the tests.

0

Please sign in to leave a comment.