pyar6329
6/16/2015 - 1:29 PM

rails_zsh_function

rails_zsh_function

function mk_rails(){
  mkdir "$1"
  cd "$1"
  bundle init
  echo "gem 'rails'" >> Gemfile
  bundle install --path .bundle --without production --binstubs .bin
  bundle exec rails new "$1" --skip-test-unit --skip-bundle
  rm -rf .bin
  rm -rf .bundle
  rm -rf Gemfile
  rm -rf Gemfile.lock
  mv "$1"/.* .
  mv "$1"/* .
  rm -rf "$1"
}