Skip to content

Instantly share code, notes, and snippets.

@ikuwow
Last active August 29, 2015 14:15
Show Gist options
  • Save ikuwow/a784e84f1e14d85dcc1f to your computer and use it in GitHub Desktop.
Save ikuwow/a784e84f1e14d85dcc1f to your computer and use it in GitHub Desktop.
Rails+Herokuで5分でWebアプリ作るおっ( ^ω^) ref: http://qiita.com/ikuwow/items/8b8aa9ac8990f98691a9
$ postgres -D /usr/local/var/postgres
$ rails new memberlist -d postgresql
$ git remote -v
heroku https://git.heroku.com/nantoka-kantoka-4491.git (fetch)
heroku https://git.heroku.com/nantoka-kantoka-4491.git (push)
$ git push heroku master
$ heroku addons:add heroku-postgresql
$ heroku run rake db:migrate
$ heroku apps:info
$ cd memberlist
$ rails s
$ createdb memberlist_development
$ rails g scaffold Member name:string comment:text
$ rake db:migrate
$ rails s
$ git init
$ git add .
$ git commit -m'initial commit'
$ bundle install
$ vim Procfile
# 中身は以下のようにする。
web: bundle exec rails server -p $PORT
$ git commit -a -m'Create procfile'
$ heroku create
gem 'rails_12factor', group: :production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment