Skip to content

Instantly share code, notes, and snippets.

@maxwell
Last active April 21, 2016 00:16
Show Gist options
  • Save maxwell/6693bf9bb3086afc12df to your computer and use it in GitHub Desktop.
Save maxwell/6693bf9bb3086afc12df to your computer and use it in GitHub Desktop.
Fix using spring from command line and RubyMine
#got this error in your Rubymine Test runner, and have to "spring stop" all the time?
#/Users/maxwell/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require': cannot load such file -- teamcity/spec/runner/formatter/teamcity/formatter (LoadError)
#!/usr/bin/env ruby
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
require 'bundler/setup'
rubymine_formatters = %w(/Applications/RubyMine.app/rb/testing/patch/bdd/teamcity
/Applications/RubyMine.app/rb/testing/patch/common/teamcity)
rubymine_formatters.each do |f|
$:.unshift File.dirname(f) if File.exists?(f)
end
load Gem.bin_path('rspec-core', 'rspec')
@maxwell
Copy link
Author

maxwell commented Jan 14, 2015

note, this seems to be broken on latest rubymine :/

@thewoolleyman
Copy link

FYI, I've got a fix for this which works with latest Spring/Rails/Rubymine as of April 2016 - see here: http://stackoverflow.com/a/36757377/25192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment