Skip to content

Instantly share code, notes, and snippets.

@wnoguchi
Last active December 19, 2015 19:18
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 wnoguchi/6004795 to your computer and use it in GitHub Desktop.
Save wnoguchi/6004795 to your computer and use it in GitHub Desktop.
railsのショートハンド定義。
# ~/.bashrc
#
# Ruby on Rails shorthand definitions
#
# ~/.bashrc
# Ubuntuの人は ~/.bash_profile に書いてね
# http://takuya-1st.hatenablog.jp/entry/20110102/1293970212
# http://kk6.hateblo.jp/entry/20120425/1335363377
#
# rake関係
alias brake='bundle exec rake'
alias bdrop='bundle exec rake db:drop'
alias bcreate='bundle exec rake db:create'
alias bmigrate='bundle exec rake db:migrate'
alias bresethard='bundle exec rake db:drop && bundle exec rake db:create && bundle exec rake db:migrate && bundle exec rake db:seed && bundle exec rake db:fixtures:load'
alias breset='bundle exec rake db:reset && bundle exec rake db:fixtures:load'
alias broutes='bundle exec rake routes'
# rails関係
alias bgen='bundle exec rails generate'
alias bserver='bundle exec rails server --debugger'
alias brc='bundle exec rails console'
# capistrano関係
alias bcap='bundle exec cap'
alias bcaps='bundle exec cap staging'
# ステージング環境にデプロイ(rake db:migrate込み)
alias bcapsdc='bundle exec cap staging deploy:cold'
# ステージング環境にデプロイ
alias bcapsd='bundle exec cap staging deploy'
# 5世代前以降のreleaseを削除する
alias bcapsclean='bundle exec cap staging deploy:cleanup'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment