5

I am using Rails 5 RC1. With the spring-commands-rspec gem (which hasn't been updated in a while at the time of writing), I have generated this spring rspec binstub in bin/rspec:

#!/usr/bin/env ruby
begin
  load File.expand_path('../spring', __FILE__)
rescue LoadError => e
  raise unless e.message.include?('spring')
end
require_relative '../config/boot'
load Gem.bin_path('rspec-core', 'rspec')

bin/rspec works, but if I run bin/rspec again, it takes as much time as the first time.

There is no speed improvement, even though spring status shows me this:

Spring is running:

29530 spring server | my_app | started 9 secs ago
29531 spring app    | my_app | started 9 secs ago | test mode

which suggests that everything is preloaded correctly.

The same setup works perfectly on Rails 4. Any idea on how to make it work in Rails 5 RC1?

Jerome Dalbert
  • 10,067
  • 6
  • 56
  • 64

0 Answers0