Questions tagged [spring-gem]

Rails application preloader

Spring speeds up development by keeping your application running in the background so you don't need to boot it every time you run a test, rake task or migration.

Features

  • Totally automatic; no need to explicitly start and stop the background process
  • Reloads your application code on each run
  • Restarts your application when configs / initializers / gem dependencies are changed

Compatibility

  • Ruby versions: MRI 1.9.3, MRI 2.0, MRI 2.1, MRI 2.2
  • Rails versions: 4.0+ (in Rails 4.1 and up Spring is included by default)

Spring makes extensive use of Process.fork, so won't be able to provide a speed up on platforms which don't support forking (, ).

30 questions
2
votes
1 answer

How to use the event-based file system listener with Spring in a Rails 4.1 application

I'm using Spring 1.1.3 with the default Polling Watcher in a Rails 4.1.4 application. Now I'd like to give the event-based file system listener a try, but can't figure out how to configure this properly. When adding the listen Gem (1.3.1) to the…
tbuehlmann
  • 9,032
  • 5
  • 27
  • 33
2
votes
1 answer

Why do I have to run "bundle exec spring" when I have a bin/spring binstub?

When running spring directly (without bundle exec) from the command line, nothing happens! Only when running bundle exec spring, it works: $ spring status $ bundle exec spring status Spring is running: 21990 spring server | synaesthesia | started 1…
Joshua Muheim
  • 12,617
  • 9
  • 76
  • 152
2
votes
1 answer

Spring is not stopping when guard exits

I am using guard-rspec with spring in my rails app. When I start guard and run tests, spring starts up fine. But when I exit from guard (by exit command in the console) guard exit, but it leaves spring running: [1] guard(main)> exit 13:38:55 - INFO…
PythonDev
  • 4,287
  • 6
  • 32
  • 39
1
vote
0 answers

gem spring-commands-rspec don't work

It seems a little strange, but gem spring-commands-rspec doesnt' work for me. Has somebody else met this strange behavior of this gem? I've installed both spring (1.3.5) and spring-commands-rspec (1.0.4) And it seems I've met the troubles with run…
Alex Antonov
  • 14,134
  • 7
  • 65
  • 142
1
vote
2 answers

Unable to push to heroku master because of rails/spring version error

The exact I keep getting when ever I try git push herou master is this: There was an error parsing your Gemfile, we cannot continue You cannot specify the same gem twice with different version requirements. You specified: spring (>= 0) and spring (=…
Ebad Saghar
  • 1,107
  • 2
  • 16
  • 41
1
vote
1 answer

Using spring with Rails3

I'm using Ruby on Rails 3.2.15 and I want to use spring in order to speed my development. I'm using guard 1.7.0 and rspec 2.13.1. This is my Guardfile: guard 'rspec', cmd: 'bundle exec spring rspec --color --fail-fast', all_on_start: false,…
mrcasals
  • 1,151
  • 10
  • 20
1
vote
0 answers

Speed up Rake Cucumber test run in Rails 4

I'd like to use Cucumber via Rake for BDD in a Rails 4. I've got it installed and hooked into spring to speed up tests but they take much longer than expected to run. The tests definitively run faster when Spring is active, but there is always ~2…
Alan W. Smith
  • 24,647
  • 4
  • 70
  • 96
1
vote
2 answers

Guard rspec doesn't run specs

When spec or model changed, guard with options spring rspec shows next output: 04:54:44 - INFO - Running: spec/models/identity_spec.rb Version: 1.1.2 Usage: spring COMMAND [ARGS] Commands for spring itself: binstub Generate spring based…
zishe
  • 10,665
  • 12
  • 64
  • 103
0
votes
1 answer

Spring is troubling rails console to start

When i am trying to execute: bundle exec rails console It is throwing me error as: /gems/spring-3.1.1/lib/spring/application.rb:96:in `preload': Spring only supports Rails >= 5.2.0 (RuntimeError) Earlier it was working fine. Can anyone help me…
Shubham kumar
  • 712
  • 7
  • 12
0
votes
0 answers

Is Spring meant to work when I run my full rspec tests suite?

I'm new to using the spring gem and have been impressed at how it has made my tests run quicker. I've followed the documentation: Included the spring and spring-command-rspec gems in the development and test groups ran $ bundle install ran $…
0
votes
0 answers

Spring gem loads in prodction enviroment

When I make rails console, it gives me this error WARNING: Spring is running in production. To fix this make sure the spring gem is only present in `development` and `test` groups in your Gemfile and make sure you always use `bundle install…
palAlaa
  • 9,500
  • 33
  • 107
  • 166
0
votes
2 answers

Uninstall non-existing Ruby gem

When starting Ruby on Rails WEBrick server (Ubuntu 14.04) the following message appears: "Warning: You're using Rubygems 1.8.23 with Spring. Upgrade to at least Rubygems 2.1.0 and run gem pristine --all for better startup performance." I've upgraded…
Rustam Rakhimov
  • 115
  • 1
  • 7
0
votes
1 answer

Rails Spring/Rspec/Guard giving errors when there were none before Spring

I was using RSpec/Guard without Spring before the upgrade from Rails 4.0 to 4.1 and all my tests were passing without any output other than green dots and green text. After upgrading and installing Spring along with whatever else I supposedly…
0
votes
1 answer

adding spring gem breaks tests - rails

I have some test using rails spec (and also capybara and factory girl) and passing just fine describe "project creation" do before(:each) do @project = FactoryGirl.create(:project) end it "create projects fluently" do visit root_path …
user1611830
  • 4,749
  • 10
  • 52
  • 89
0
votes
1 answer

Error with listen gem loading

I wanted to use spring gem on my Rails 4.0.2 project. To get further functionality, I added listen gem as well. Unfortunately, when doing rails c, the loader gives the following error: bi@nona:~/ror/prj$ rails…
B.I.
  • 706
  • 3
  • 9
  • 19
1
2