2013年8月25日日曜日

rails new project

railsで新規プロジェクト作成するshell書いた

#!/bin/bash

# rails common project directory
RAILS_PROJECT_DIR=~/Documents/projects/ruby
# project name
echo "input PROJECT_NAME:"
read PROJECT_NAME
# shell
MY_SHELL=/bin/zsh

mkdir $RAILS_PROJECT_DIR/$PROJECT_NAME && cd $_

# install rails
rails new . --skip-bundle

# add spring
cat << EOF >> Gemfile
# Spring is a Rails application preloader
group :development, :test do
    gem 'spring'
end
EOF

bundle install
exec MY_SHELL

0 件のコメント:

コメントを投稿