spring
spring copied to clipboard
'spring binstub' not parsing Gemfile.lock containing CRLF correctly
If a Gemfile.lock is created with carriage returns as part of the line ending, spring's binstub fails to locate the spring gem.
I'm running RubyMine on Windows with a remote vagrant installation of Ubuntu. When bundle install is run from within RubyMine, the resulting Gemfile.lock contains CRLF line terminators. The regex in the bin/spring fails to match correctly in this case, since the lockfile is read in a non-text context.
This is probably a bit of an edge case, but I have seen other problems reported running with users running spring under vagrant on a Windows host.
I've worked around this by manually editing bin/spring to read the lockfile in text mode by adding (textmode: true) to the read. This should work cross-platform. Unfortunately, that requires a manual step whenever the binstubs are regenerated.
Happy to submit a PR if you'd like.
+1 just ran into this. Same reason. I'm using vagrant on windows along with rubymine. Adding textmode: true fixed the problem.