teamcity issue in RubyMine 6.3.1

I upgraded from RubyMine 6.0 to RubyMine 6.3.1 today (via installing 6.3 and then updating via patch to 6.3.1).
Using Ruby 2.0.0 on Ubuntu 13.10

Everything was working fine in RubyMine 6.0. In the upgraded RubyMine (6.3.1), when I try to run an RSpec script (as an RSpec configuration, or as a rake task with RSpec test runner attached), I get the following error message:

/home/dara/.rvm/rubies/ruby-2.0.0-p451/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/dara/.rvm/gems/ruby-2.0.0-p451/bin/rspec /home/dara/workspace/qa-pep-testing/Sandbox.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter
Testing started at 2:57 PM ...
/home/dara/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- teamcity/spec/runner/formatter/teamcity/formatter (LoadError)
 from /home/dara/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
 from /home/dara/.rvm/gems/ruby-2.0.0-p451/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:867:in `block in setup_load_path_and_require'
 from /home/dara/.rvm/gems/ruby-2.0.0-p451/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:867:in `each'
 from /home/dara/.rvm/gems/ruby-2.0.0-p451/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:867:in `setup_load_path_and_require'
 from /home/dara/.rvm/gems/ruby-2.0.0-p451/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:25:in `configure'
 from /home/dara/.rvm/gems/ruby-2.0.0-p451/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:21:in `run'
 from /home/dara/.rvm/gems/ruby-2.0.0-p451/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run'
 from /home/dara/.rvm/gems/ruby-2.0.0-p451/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in `block in autorun'
Process finished with exit code 1


I found some similar issues in the bug tracker:
http://youtrack.jetbrains.com/issue/RUBY-15184
http://youtrack.jetbrains.com/issue/RUBY-14970
http://youtrack.jetbrains.com/issue/RUBY-15182

None of them helped me fix my problem. Following the instructions in RUBY-15182, I checked that there is formatter.rb in <RubyMine_directory>/rb/testing/patch/bdd/teamcity/spec/runner/formatter/teamcity/
The file is there.

6 comments

Hi,

it looks like we need more information:

- are you using rails or it is just plain Ruby project?
- do you have either rspec or rspec-rails in your gemfile? (I'm almost sure you are but it is better to double-check)
- also please try to remove the run configuration and re-create one (with selecting "run spec" on a particular file)

Regards, Oleg.

0

And two more things:
- could you please check if formatter.rb is accessible for you user.
- you can also try to reinstall RubyMine 6.3.1 (but please do not unpack it over existing installtion)

Regards, Oleg.

0

Thank you for the suggestions.

- are you using rails or it is just plain Ruby project?

plain Ruby

- do you have either rspec or rspec-rails in your gemfile? (I'm almost sure you are but it is better to double-check)

I'm not quite sure what you mean by "in your gemfile". I have installed the RSpec gem and require it in my rakefile when running my tests as rake tasks.

- also please try to remove the run configuration and re-create one (with selecting "run spec" on a particular file)

Tried this, no change. Same error as above.


- could you please check if formatter.rb is accessible for you user.

Confirmed. The permissions are correct.

- you can also try to reinstall RubyMine 6.3.1 (but please do not unpack it over existing installtion)

Tried this, no change.


0

Something I didn't include here (sorry, thought I had) that is relevant:

These are RSpec test scripts. I usually run them in RubyMine as rake tasks, with the RSpec test runner attached in the configuration. Sometimes I run them using the RubyMine RSpec configuration.

In RubyMine 6.0 everything was running fine.

In RubyMine 6.3:
Attempting to run the scripts under RSpec configuration doesn't work. Running under rake configuration with RSpec test runner attached doesn't work. Running under rake configuration with RSpec test runner NOT attached works fine.

0

Hi,

it looks like a bug for me (please file it in our tracker - http://youtrack.jetbrains.com/issues/RUBY).
As a workaround (and to follow the way most ruby apps use) I'd suggest to use Bundler (http://bundler.io)
this way the problem should be fixed and (also) bundler will control gems your app is using.

Hope this helps, Oleg.

P.S. The easiest to use bundler is to intall bundler gem (gem install bundler), after that in RubyMine Tools|Bundler|Init,
and add "gem 'rspec'" to Gemfile, Tools|Bundler|Install.

0

Hi Oleg,

Thanks. I logged RUBY-15258. I'm not sure what to do with your suggestion of using bundler. I am writing RSpec scripts for testing a non-Ruby application (I'm writing Selenium/WebDriver tests for a web application). Bundler seems to be something to be used when creating a ruby application. I'm not making an application, with Rails or otherwise.

Thanks,

-Dara

0

Please sign in to leave a comment.