Created
June 2, 2012 06:01
-
-
Save bash0C7/2856886 to your computer and use it in GitHub Desktop.
install rails and run rails new
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -ne 1 ]; then | |
echo "引数1にrailsアプリ名を入れて下さい" 1>&2 | |
exit 1 | |
fi | |
cat << EOS > Gemfile | |
source "http://rubygems.org" | |
gem "rails", "3.2" | |
EOS | |
bundle install --path vendor/bundle | |
mkdir $1 | |
git init $1 | |
bundle exec rails new $1 -T | |
rm -f Gemfile | |
rm -f Gemfile.lock | |
rm -rf .bundle | |
rm -rf vendor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment