Running a spec in RubyMine results in “cannot load such file — teamcity/spec/runner/formatter/teamcity/formatter (LoadError)”

Run

spring stop

on the command line before running rake from RubyMine, or running specs directly, or doing anything else that uses spring.

You don’t need to do this every time you run rake or specs or whatever in RubyMine, only if you previously started spring by running rake or doing something else that starts spring outside of RubyMine. You also don’t need to spring stop when you switch from RubyMine back to the command line.

This happens because if spring is not running when you run rake or whatever outside RubyMine, spring will start and will preload your code but not RubyMine-specific code. Evidently spring doesn’t know how to load missing code after it’s been started.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)