heroku 小青年

gem install heroku foreman

当你创建完一个项目后并且通过

$git init

$git add .

$git commit -m "Init"

$git remote add origin https://github.com/<username>/<项目名称>.git

$git push -u origin master

提交到GitHub上

然后在用

$git push heroku master

$heroku create --stack cedar

$heroku run db:migrate

这样就完成了。

一定要注意在你的Gemfile文件中添加

group :production do 

  gem 'pg'

end 因为heroku用的是Postgresql

原文地址:https://www.cnblogs.com/perish/p/2634106.html