IntelliJIDEA14でRuby on Rails上のRSpecを実行する方法


IntelliJIDEAでRuby on RailsプロジェクトのRSpecを実行する方法が分からなくて困っています。

どなたか、教えていただけないでしょうか？

# 追記

RspecをInstallしたあとでspecを右クリックからAll Spec in modelsを実行すると以下のエラーメッセージが出ます。

[code]

    /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require': cannot load such file -- teamcity/spec/runner/formatter/teamcity/formatter (LoadError)
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `block in require'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1072:in `block in requires='
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1072:in `each'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1072:in `requires='
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration_options.rb:103:in `block in process_options_into'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration_options.rb:102:in `each'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration_options.rb:102:in `process_options_into'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration_options.rb:22:in `configure'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:95:in `setup'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:84:in `run'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:69:in `run'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:37:in `invoke'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.7/exe/rspec:4:in `<top (required)>'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:241:in `load'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:241:in `block in load'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:241:in `load'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-commands-rspec-1.0.4/lib/spring/commands/rspec.rb:18:in `call'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /Users/seijiro/.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from -e:1:in `<main>'
    
    Process finished with exit code 1
    
[/code]

teamcityも使用してなく、IntelliJの設定もこの辺に関しては初期設定の状態です。

IntelliJの設定周り調べます。




この件と同じではないでしょうか？

[spec すると `require': cannot load such file --
teamcity/spec/runner/formatter/teamcity/formatter](http://qiita.com/sato1043/items/5e797a5358592389bae4)

簡単に言うと、ターミナルから

[code]

    spring stop
    
[/code]

または

[code]

    bin/spring stop
    
[/code]

を実行してspringを停止させてから、もう一度IntelliJ IDEAからRSpecを実行するとちゃんと動くかもしれません。




この件と同じではないでしょうか？

[spec すると `require': cannot load such file --
teamcity/spec/runner/formatter/teamcity/formatter](http://qiita.com/sato1043/items/5e797a5358592389bae4)

簡単に言うと、ターミナルから

[code]

    spring stop
    
[/code]

または

[code]

    bin/spring stop
    
[/code]

を実行してspringを停止させてから、もう一度IntelliJ IDEAからRSpecを実行するとちゃんと動くかもしれません。

