I recently started the "Intro to Rails" screencast on nettuts. So I am not very familiar with Rails obviously and only know a little about Ruby. Everything else in the code will run correctly however when I run guard-rspec it displays this:
/Users/hanssingh/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/minitest/unit.rb:1013:in `block in process_args': invalid option: -f (OptionParser::InvalidOption)
from /Users/hanssingh/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/minitest/unit.rb:992:in `new'
from /Users/hanssingh/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/minitest/unit.rb:992:in `process_args'
from /Users/hanssingh/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/minitest/unit.rb:1042:in `_run'
from /Users/hanssingh/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/minitest/unit.rb:1035:in `run'
from /Users/hanssingh/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/test/unit.rb:21:in `run'
from /Users/hanssingh/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/test/unit.rb:774:in `run'
from /Users/hanssingh/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/test/unit.rb:366:in `block (2 levels) in autorun'
from /Users/hanssingh/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/test/unit.rb:27:in `run_once'
from /Users/hanssingh/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/test/unit.rb:365:in `block in autorun'
I am not very sure what this error means and how do I get rid of it?
Seems to be caused by the turn gem (I suspect you have it). Remove it from your Gemfile, run bundle again, and then try your tests with guard once more. This worked for me.
Was having a similar issue getting Test::Unit errors when running Guard:
/usr/local/var/rbenv/versions/1.9.3-p327/lib/ruby/1.9.1/test/unit.rb:49:in `process_args': invalid option: -f (OptionParser::InvalidOption)
According to https://github.com/guard/guard/issues/170 this was caused by having the shoulda gem included in my Gemfile. Changing this to should-matchers fixed the issue for me without having to lose the loveliness of shoulda.
Studying the Nettuts 'Intro to Rails' Gemfile it seems to contain the 'turn' gem which is minitest-based. So removing this from your Gemfile should help, as #kladd suggests.
Related
After finishing the official getting started guide for RoR I played with it so much that I ruined the blog so I decided just to scrap everything and start again.
Now that I'm trying to run the rails server I get this error
/home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/actions.rb:109:in `expand_path': No such file or directory - getcwd (Errno::ENOENT)
from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/actions.rb:109:in `destination_root='
from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/actions.rb:85:in `initialize'
from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/cli.rb:17:in `initialize'
from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor.rb:359:in `new'
from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor.rb:359:in `dispatch'
from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/base.rb:440:in `start'
from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/cli.rb:10:in `start'
from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/bin/bundle:20:in `block in <top (required)>'
from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
from /home/nadia/.gem/ruby/2.0.0/gems/bundler-1.5.2/bin/bundle:20:in `<top (required)>'
from /home/nadia/.gem/ruby/2.0.0/bin/bundle:23:in `load'
from /home/nadia/.gem/ruby/2.0.0/bin/bundle:23:in `<main>'
in the gemfile I have added
gem 'railties', '~>4.0.2'
then
$ bundle install
to try and resolve the issue. However it still hasn't work. I'm fairly new so I'm not actually sure what the error is.
Any thoughts would be appreciated.
I'm also running rails v4.0.2 if that helps
This is a pretty weird thing to see:
No such file or directory - getcwd (Errno::ENOENT)
Are you trying to run this application from a directory you maybe moved, or even deleted? That error implies that it can't determine the current directory.
Define rails in gem file like this
gem 'rails', '4.0.2'
And then bundle install.
Whoops. I derped. All sorted now. I was simply trying to run it from the wrong directory.
Should have seen it earlier.
I'm following Hartl's guide to Ruby on Rails, and I'm currently trying to set up "guard" and "spork" for automating "rspec" testing. When I try to run
bundle exec rspec spec/requests/static_pages_spec.rb
I get the following errors:
/home/throne/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:434:in `require': cannot load such file -- b (LoadError)
from /home/throne/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:434:in `block in requires='
from /home/throne/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:434:in `map'
from /home/throne/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:434:in `requires='
from /home/throne/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:20:in `block in configure'
from /home/throne/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:19:in `each'
from /home/throne/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:19:in `configure'
from /home/throne/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:21:in `run'
from /home/throne/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in `run'
from /home/throne/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'
I looked at other solutions for people who had similar kinds of problems (things like reinstalling gems, using absolute paths and fixing do / end statements in the target file), but none of them seemed to even change the issue. Thanks for any help!
Rewrite your Gemfile. Change 'selenium-webdriver' to '~> 2.35.1', reinstall bundle and everything has to be OK!
I had same error when tried to run test with single dash in params (need to run with --rdb).
This page came up when I was researching the same problem using the same tutorial. After some added investigation, I discovered that I was typing only a single dash on the --drb option. With a single dash rspec enables debugging and tries to require the file 'b'. Very different from connecting to a DRb server :-
I'm trying to learn Rails, and running into a bit of a problem I don't understand. I started with Hartl's book and looking at this error message, it looks like something to do with what I was doing for that.
Now that I'm on a new project, I get this when I try to run a test on my routes file.
1) Error:
test_that_/login_route_opens_the_login_page(CursomRoutesTest):
ActiveRecord::StatementInvalid: Could not find table 'statuses'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/connection_adapters/sqlite_adapter.rb:472:in `table_structure'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/connection_adapters/sqlite_adapter.rb:346:in `columns'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:660:in `column_names'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:652:in `timestamp_column_names'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:585:in `block in table_rows'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:579:in `each'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:579:in `map'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:579:in `table_rows'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:494:in `block (3 levels) in create_fixtures'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:492:in `each'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:492:in `block (2 levels) in create_fixtures'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:491:in `block in create_fixtures'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:168:in `disable_referential_integrity'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:476:in `create_fixtures'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:895:in `load_fixtures'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:849:in `setup_fixtures'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:418:in `_run__3689392786993953837__setup__3124079788890242138__callbacks'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/TomEllis/.rvm/gems/ruby-1.9.3-p392#rails3tutorial2ndEd/gems/activesupport-3.2.13/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
You probably haven't run the rake task to prepare your test database:
bundle exec rake db:test:prepare
bundle exec rake db:test:clone
I'm also a Rails newbie and I encountered a very similar problem (working on a different project, but getting errors referencing Hartl). After mulling it over in my head and googling, I believe I found the overall problem and solution.
Still, could anyone explain what the reference to the rails3tutorial is in the gems and how to remove it?
When we started the rails tutorial, Hartl advised us to run the following command:
$ rvm use 1.9.3#rails3tutorial2ndEd --create --default
Using /Users/mhartl/.rvm/gems/ruby-1.9.3 with gemset rails3tutorial2ndEd
(http://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=3.2#sec-install_rubygems)
The outcome?
...any time we open a new terminal window the 1.9.3#rails3tutorial2ndEd Ruby/gemset combination is automatically selected.
I fixed this by running:
rvm use 1.9.3-p484 --default
(http://rvm.io/gemsets/using)
This made the "regular" gemset our default gemset (as opposed to our custom Hart tutorial gemset). I'm pretty sure "regular gemset" is the wrong term, but I'm still in the beginner phase, so my apologies to everyone who knows the correct term. I hope that helps!
I've just upgraded to ruby 1.9.3-p0 and rails 3.2.0. I'm now trying to debug an error in one of my tests using
rspec spec -d
But I get this error:
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:422:in `rescue in debug=': (RuntimeError)
**************************************************
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol: ruby_threadptr_data_type - /home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so
If you have it installed as a ruby gem, then you need to either require
'rubygems' or configure the RUBYOPT environment variable with the value
'rubygems'.
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `require'
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `<top (required)>'
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `require'
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `<top (required)>'
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:408:in `require'
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:408:in `debug='
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/configuration_options.rb:19:in `block in configure'
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/configuration_options.rb:18:in `each'
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/configuration_options.rb:18:in `configure'
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:21:in `run'
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
/home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'
**************************************************
from /home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:407:in `debug='
from /home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/configuration_options.rb:19:in `block in configure'
from /home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/configuration_options.rb:18:in `each'
from /home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/configuration_options.rb:18:in `configure'
from /home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:21:in `run'
from /home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
from /home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
from /home/map7/.rvm/gems/ruby-1.9.3-p0#rails3.2/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'
Install the new debugger gem that works with Ruby 1.9.3 and 1.9.2:
https://github.com/cldwalker/debugger
Stick this in your Gemfile:
# one-liner to install these properly: bash < <(curl -L https://raw.github.com/gist/1333785)
gem 'linecache19', '0.5.13'
gem 'ruby-debug-base19', '0.11.26'
You'll need to run that one-liner in order for bundler to pick up the proper gems.
EDIT: I forgot to link to the posts I used to get debugging working:
ruby-debug with Ruby 1.9.3?
ruby-debug19 on ruby-1.9.3-preview1
I guess I can't comment on other answers yet, but I found many of these instructions don't mention you'll still need to include the
gem 'ruby-debug19', :require => 'ruby-debug'
line in your Gemfile, in addition to the instructions siannopollo provides. Without this, I get a 'cannot load such file -- ruby-debug' error (OSX, rvm, 1.9.3-p125).
FWIW, the gist is hardcoded to 1.9.3-p0, so if you're on 1.9.3-p125, you might need to edit it (also, generally a bad idea to execute a gist you haven't read).
For me, all it took was:
gem 'debugger'
in the Gemfile
Had to upgrade the following
bundle update ruby-debug-base19
I'm trying to teach myself rails by going through http://railstutorial.org/. I quit working on the tutorial app last night and then came back to it today. Now I'm getting an error when I start up the Spork server. Here is a trace of the error.
spork Using RSpec Loading Spork.prefork block... can't convert nil into Hash (TypeError) /usr/local/lib/ruby/gems/1.8/gems/activemodel-3.0.0/lib/active_model/validations/validates.rb:90:in merge' /usr/local/lib/ruby/gems/1.8/gems/activemodel-3.0.0/lib/active_model/validations/validates.rb:90:invalidates' /usr/local/lib/ruby/gems/1.8/gems/activemodel-3.0.0/lib/active_model/validations/validates.rb:83:in each' /usr/local/lib/ruby/gems/1.8/gems/activemodel-3.0.0/lib/active_model/validations/validates.rb:83:invalidates' /Users/chietala/Desktop/rails_projects/sample_app/app/models/user.rb:20 /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:454:in load' /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:454:inload_file' /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:453:inload_file' /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:340:in require_or_load' /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:300:independ_on' /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:216:in require_dependency' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/engine.rb:138:ineager_load!' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/engine.rb:137:in each' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/engine.rb:137:ineager_load!' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/engine.rb:135:in each' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/engine.rb:135:ineager_load!' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:108:in eager_load!' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application/finisher.rb:41 /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:25:ininstance_exec' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:25:in run' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:50:inrun_initializers' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:49:in each' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/initializable.rb:49:inrun_initializers' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:134:in initialize!' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:77:insend' /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/application.rb:77:in method_missing' /Users/chietala/Desktop/rails_projects/sample_app/spec/../config/environment.rb:5 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require' /Users/chietala/Desktop/rails_projects/sample_app/spec/spec_helper.rb:10 /usr/local/lib/ruby/gems/1.8/gems/spork-0.8.4/bin/../lib/spork.rb:23:inprefork' /Users/chietala/Desktop/rails_projects/sample_app/spec/spec_helper.rb:4 /usr/local/lib/ruby/gems/1.8/gems/spork-0.8.4/lib/spork/test_framework.rb:138:in load' /usr/local/lib/ruby/gems/1.8/gems/spork-0.8.4/lib/spork/test_framework.rb:138:inpreload' /usr/local/lib/ruby/gems/1.8/gems/spork-0.8.4/lib/spork/app_framework.rb:64:in preload' /usr/local/lib/ruby/gems/1.8/gems/spork-0.8.4/lib/spork/test_framework.rb:134:inpreload' /usr/local/lib/ruby/gems/1.8/gems/spork-0.8.4/bin/../lib/spork.rb:67:in exec_prefork' /usr/local/lib/ruby/gems/1.8/gems/spork-0.8.4/lib/spork/test_framework.rb:120:inpreload' /usr/local/lib/ruby/gems/1.8/gems/spork-0.8.4/lib/spork/run_strategy/forking.rb:25:in preload' /usr/local/lib/ruby/gems/1.8/gems/spork-0.8.4/bin/../lib/spork/runner.rb:74:inrun' /usr/local/lib/ruby/gems/1.8/gems/spork-0.8.4/bin/../lib/spork/runner.rb:9:in run' /usr/local/lib/ruby/gems/1.8/gems/spork-0.8.4/bin/spork:10 /usr/local/bin/spork:19:inload' /usr/local/bin/spork:19
Luckily I am using Git for version control and I was in a separate branch when I received this problem, however switching to the master still results in the error.
I'm not really sure where or how to fix this problem. Anyone have any ideas?
I was using 1.9.2, rails3, and rspec-rails 2.0.0rc with spork-0.8.4 successfully. Then I upgraded to rspec-rails 2.0.0 and had some issues.
I just upgraded my Gemfile to rspec-rails 2.0.1 and spork 0.9.0.rc2 and everything works again!
Gemfile:
gem 'rspec-rails','>= 2.0.1'
gem 'spork', '>= 0.9.0.rc2'
Give that a shot. (You can always switch back to your old version, if it doesn't help.)
Check the spork page on github to see if there are any other things to consider. If you are using 1.8.7 there may be some differences.
If you want the cutting edge (sometimes I do on gems):
gem 'spork', :git => 'http://github.com/timcharper/spork.git'
Maybe there is a fix for your particular combo....
Let me know if this helps!