RSpec + Spork doesn't work in RubyMine > 3.2.1

Before 3.2.2 I could run specs off Spork just fine inside RM. Now I get:

`require': no such file to load -- teamcity/spec/runner/formatter/teamcity/formatter (LoadError)

If I stop the Spork server my tests run fine.

I'm on OS X Snow Leopard and just upgraded to RM 3.2.3. Any ideas how to fix? Many thanks.

7 comments
Comment actions Permalink

Did you update spork gem recently? Please describe you environment, e.g ruby interpreter, rspec, spork, rails versions.

0
Comment actions Permalink

Thanks for the reply!

Here's my env:

rails (3.0.9)

rspec (2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)
spork (0.7.5)

All with Ruby 1.9.2-p136.

Per the link you gave, I tried recreating my test launch script (Run --> Edit Configurations --> New RSpec (all specs in folder)), but no luck -- I get the same error.

FYI: this does seem to be RSpec-specific. I say that because I have another project also using RubyMine 3.2.1 but with Spork+Test::Unit. Tests for that project run fine inside RM.

0
Comment actions Permalink

That issue suggests to recreate spork server launching scripts not a run configuration for test. In neighbor thread Larry had the similar trobule with rspec Spork With RSpec and Cucumber


If doesn't help - please show full console output and your run configuration options.

0
Comment actions Permalink

OK, this thread says "Be sure to delete all old scripts, which launches spork and tests and generate them from scratch."

What "old scripts"? Can you give me some file names please? From both links you sent it's unclear what I need to remove in hopes that RM will regenerate.

Thanks!

0
Comment actions Permalink

"RSpec: Spork DRb server" or "Cucumber: Spork DRb server" scripts. If you change project sdk these scripts wont be updated automatically (RUBY-9045 Upgrading Ruby Should Upgrade Spork Server Settings).

0
Comment actions Permalink

Ah, yes. To be crystal clear here is what a person with my issue needs to do to fix it:

  1. In RM navigate to Run --> Edit Configurations
  2. Expand 'Ruby' in the left panel
  3. Click 'RSpec: Spork DRb server'
  4. Click the ellipse to edit the environment variables
  5. Edit the RUBYLIB environment variable. Most likely one of the paths in the value has the wrong RM version. For example, on my Mac I had to change /Applications/RubyMine 3.2.1.app/rb/testing/patch/bdd to /Applications/RubyMine 3.2.3.app/rb/testing/patch/bdd (version 3.2.1 to 3.2.3)


Worked for me. Thanks for your  help Roman.

0

Please sign in to leave a comment.