Problem configuring Spork

Edit: 14-Feb-12
Don’t use the spork gem. Use the spork-rails gem. Looks like the spork team split the core functionality out into the spork gem and put rails/sinatra specific stuff into the spork-rails/spork-sinatra gems.

When I added the spork-rails gem my problems went away and I also am using a much more recent version of spork then the old 0.8.4 version.

—————————————————————————————-

Original Post:
I have gotten a bit ahead of myself with coding without testing so my current goal is to catch up my rspec specs to match and possibly even pass my existing code base.

The problem is since I have ran rspec last I have upgraded to Rails 3.2. So it appears that my spork, rspec and watcher install is kind of screwed up.

When I try to run spork or bundle exec spork I get the following error:

So when I check the contents of /usr/local/rvm/gems/ruby-1.9.2-p290/bin/spork, line 19 is the following:

I ended up having to uninstall spork:

and reinstall it with “bundle install”

Still no luck, was getting the same error. So after some googling I found out that people were having problems with Spork 0.9.0 and that the solution was to fall back to Spork 0.8.4. So I uninstalled Spork again and changed my gemfile to have the following line:

After re-running “bundle install” spork would now launch.

Next problem: Rspec is not running spork. Turns out that problem was really easy to fix though. I just forgot to add –drb to my .rspec file in the root of my project. Rspec, Spork and Watchr are working great now!

One thought on “Problem configuring Spork

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">