Bash shortcuts to run Rails commands through Spring, Bundler, or ye olde scripts

Just about a year ago to date I posted some useful Bash shortcuts for Ruby on Rails commands. These are mix of aliases and functions that detect what version of Rails is present and routes commands which ever way that version expects, i.e. ./script/console versus rails console. Now that Rails 4.1 ships with Spring by default, there is yet one more way commands could be routed – through the spring binstubs. I’ve recently updated my shortcuts to account for this. Now my commands will use the binstubs if they are present, or fallback to the other version-dependent methods.

H/T to makandracards for helping me figure this out.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Previous post Cache busting AJAX requests and redirects
Next post Setting up a Rails 5 app from edge