RubyMine EAP 138.2332 ; Ruby 2.1.2 ; Rails 4.1.6 ; Ubuntu 14.04
How do you get Spring to work?
This is what the RM Help Doc has to say:
When spring is installed, Spring appears in the list of pre-loaded servers in the default run/debug configurations for RSpec, Test::Unit/Shoulda/Minitest, and Cucumber.
It is important to note that there is no dedicated run/debug configuration for the Spring server. Spring server is launched by default.
I put " gem 'spring' " into my Gemfile and it installed correctly.
SUB-QUESTION: The Rails doc says to put that statement in the 'development' section of the Gemfile. It seems to me that if you are going to use Spring for running tests that it should be in the 'test' section as well, should it not?
Regardless, I included the "gem spring" statement in both the 'development' and 'test' sections of the Gemfile.
I then ran the following command as per the RailsGuide instructions. Here is the command and its output:
larry@larry-lap:~/RubyMine/StupidTuesday$ bundle exec spring binstub --all
* bin/rake: spring inserted
* bin/rails: spring inserted
Then I went to the Run/Config section and for both RSpec and Cucumber for "Use pre-load server:" I selected "Spring". That seems to be working because when I select "None" my specs and cukes run fine and no mention is made of Spring.
However, when I try to run either RSpec or Cucumber I get the following error with the follwing output:
ERROR: Test framework quit unexpectedly
Testing started at 10:01 AM ...
Usage: spring COMMAND [ARGS]
Commands for spring itself:
binstub Generate spring based binstubs. Use --all to generate a binstub for all known commands.
help Print available commands.
status Show current status.
stop Stop all spring processes for this project.
Commands for your application:
rails Run a rails command. The following sub commands will use spring: console, runner, generate, destroy.
rake Runs the rake command
Process finished with exit code 0
Can someone tell me what I am doing wrong? (And also if the "gem spring" should appear in just 'development' or both 'development' and 'test' in the Gemfile.)