Skip to content

Instantly share code, notes, and snippets.

@sunaot
Created May 7, 2012 11:42
Show Gist options
  • Save sunaot/2627359 to your computer and use it in GitHub Desktop.
Save sunaot/2627359 to your computer and use it in GitHub Desktop.
To use `bundle exec rake` without `bundle exec`

ファイル準備

mv Rakefile Rakefile.plain
vim Rakefile.bundler
ln -s Rakefile.bundler Rakefile

Rakefile.bundler の中身

  # Rakefile.bundler
  require 'bundler'
  load './Rakefile.plain'

こんな構成になる

Rakefile -> Rakefile.bundler
Rakefile.bundler
Rakefile.plain

bundle exec rake でなく rake で動くようになる

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