Skip to content

Instantly share code, notes, and snippets.

@bash0C7
Created June 2, 2012 06:01
Show Gist options
  • Save bash0C7/2856886 to your computer and use it in GitHub Desktop.
Save bash0C7/2856886 to your computer and use it in GitHub Desktop.
install rails and run rails new
#!/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