在heroku上部署rails3应用

参考官网步骤 https://devcenter.heroku.com/articles/rails3#deploy-your-application-to-heroku

 

以下是我的实际测试步骤:

1. 登录www.heroku.com注册账户

2.下载并安装Heroku Toolbelt: https://toolbelt.heroku.com/

3.在git bash(toolbelt会安装该软件)中登录heroku

4.安装rails: gem install rails 【已安装则跳过此步】

5.cd d:\dev\ruby\

5.rails new myapp

6.cd myapp

7.打开文件"Gemfile",将gem 'sqlite3'改为gem 'pg'

8.gem install rake -v '10.0.1'

9.gem install i18n -v '0.6.1'

10.gem install multi_json -v '1.3.7'

11.gem install builder -v '3.0.4'

12.gem install rack-test -v '0.6.2'

13.gem install tzinfo -v '0.3.35'

14.gem install coffee-script-source -v '1.4.0'

15.gem install execjs -v '1.4.0'

16.gem install coffee-script -v '2.2.0'

17.上 https://github.com/oneclick/rubyinstaller/downloads/ 下载DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe (我使用的ruby是1.9.3)。然后解压到D:\DevKit,git bash中切换到该目录后执行ruby dk.rb init和ruby dk.rb install,详情参见 https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

18.gem install json -v '1.7.5'

19.cd d:\dev\ruby\myapp

20.gem install rdoc -v '3.12'

21.gem install coffee-rails -v '3.2.2'

22.gem install jquery-rails -v '2.1.3'

23.gem install pg -v '0.14.1'

24.gem install sass -v '3.2.3'

25.gem install sass-rails -v '3.2.5'

26.gem install uglifier -v '1.3.0'

27.bundle install

28.git init

29.git add .

30.git commit -m 'init'

31.heroku create

32.git push heroku master

33.heroku open 【执行该命令可自动打开浏览器,查看上传的应用】

 

你可能感兴趣的:(rails3)