Modified rails script for Rails4 or Bundler's binstabs