Skip to content

Instantly share code, notes, and snippets.

@between40and2
Created July 1, 2014 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save between40and2/fc025a108b8b814efcd5 to your computer and use it in GitHub Desktop.
Save between40and2/fc025a108b8b814efcd5 to your computer and use it in GitHub Desktop.
Scripts under bin directory of your Rails app

bundle

#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')

rails

#!/usr/bin/env ruby
APP_PATH = File.expand_path('../../config/application',  __FILE__)
require_relative '../config/boot'
require 'rails/commands'

rake

#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run

The End

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment