I use Rails 4 with spring
& spring-commands-rspec
gem. This question have relation to this: spring using by default
When I run time rspec
I get something like 5 seconds. If I run time bin/rspec
I have 2 seconds.
If I run time rake -T
I get 3 seconds, if I run time bin/rake -T
I get less than a second.
Where is the trouble? Why I need to run all commands through bin/
binstubs to parse them through spring
. How can I avoid that?
Related issue at github: https://github.com/jonleighton/spring-commands-rspec/issues/17#issuecomment-43174278
I avoid that by explicitly calling spring
before all the commands I run, like spring rspec spec
, spring rails c
, spring rake
. And to make that easier, I aliased spring
to just s
. It's kinda impossible to integrate spring right into those binaries because, among many other reasons: RSpec, Rake and Rails binaries are not aware of Spring existence, you can't assume you (and everyone else) always wants to run commands using Spring. You can open those files in your bin folder using you text editor and see what Spring is doing there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With