Unable to bulk run rspec tests


I'm having a strange issue with my Linux install of Rubymine (2018.3.3) where I'm unable to bulk run any RSpec tests, either from right clicking the containing folder in the project view, or from manually setting up a Run/Debug configuration.

I have a Rubymine install on my Mac laptop, with identical Run/Debug configuration, that is able to bulk run the same tests. The tests live in spec/units and spec/features. Right clicking the individual _spec.rb files runs the tests as expected. Running 'rspec' in the working directory from the command also runs all tests.

No error message is received - instead it simply says no examples found and exits.

My bundle env is here: https://pastebin.com/wCgwipar

My gem environment (from Tools -> Show Gem Environment) is here: https://pastebin.com/RN98Lv7s

Ruby version is 2.5.0, both in the terminal and in the project SDK settings (ruby-2.5.0-p0). It's been installed through rvm.

It also happens with ruby 2.6 and I've done completely clean installs of ruby, rvm, gems and Rubymine. Needless to say, rspec 3.8.0 is installed and runs the tests flawlessly when right-clicked individually.

Both the working directory, spec directory and pattern match in the Run/Debug settings are identical between the two computers.

I'd be extremely grateful for any help on this as it's proving pretty hard to google. I've also put the command run by rubymine when the tests are executed below. The only difference I can see between the (working) mac and the linux version is that the Mac install wraps the command in:

"bash -c "/Users/colin/.rvm/bin/rvm ruby-2.5.0 do bundle exec etc...<rest of command matches> ""

I'm not sure of the significance (if any), but there's no Runner Options or custom RSpec runner script selected in the Mac settings, so I'm not sure how to duplicate with my linux install.

Many thanks for any help!



bundle exec /usr/share/rvm/rubies/ruby-2.5.0/bin/ruby /home/colin/.rvm/gems/ruby-2.5.0@global/bin/rspec /home/colin/Documents/Ruby/Takeaway_2/spec --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter --pattern '**/*_spec.rb'
No examples found.

0 examples, 0 failures, 0 passed

Finished in 0.000724208 seconds

Process finished with exit code 0

Comment actions Permalink

Hello Colin,

sorry for the delay. Would it be possible to check how it goes in RubyMine 2019.1 Beta? Does the problem persist?

Comment actions Permalink

I just ran into this same issue in 2018.3.5, and have no idea why ("I didn't change anything!").  I was able to work around it by modifying the 'rspec all' task configuration and wrapping the "File name mask" with single quotes, i.e. **/*_spec.rb -> '**/*_spec.rb'.  Maybe there's some issue with bash trying to expand the file glob when in the wrong directory, or something?

Comment actions Permalink


does the same happen in the last 2019.2/2019.2.1Preview? I didn't manage to reproduce the problem there.

Comment actions Permalink

Sorry, I haven't upgraded, so don't know if the same issue exists in in 2019.  I suspect this isn't specific to the RubyMine version, as mine was working fine for the longest time.  Maybe some incompatibility related to RVM?

Comment actions Permalink

It's hard to say but since there've been improvements related to rvm support as well it'b great to check how it goes in the last version as well (it's 2019.2.1 RC at the moment)


Please sign in to leave a comment.