访问次数
我的另一个总结性博客: todototry 大米粒

rails 3 部署到 heroku

gem install heroku
rails new myapp
cd myapp
由于heroku只支持PostgreSQL
所以要再Gemfile里加入
gem 'sqlite3'
gem 'pg'
然后执行
bundle install
发布项目到github
git init
git add.
git commit --'init my project'
heroku create --stack cedar /////heroku create如果已经存在stack

git push heroku master

可用命令:
heroku logs
heroku ps
heroku run console

rake命令
heroku run rake db:migrate
heroku run rake -T

启动服务
gem 'thin'

posted @ 2011-10-22 20:41  fandyst  阅读(406)  评论(0编辑  收藏  举报