heroku 初次部署

1、git 下载安装

2、建立git 仓储
进入项目目录
git init

3、添加忽略文件
vi .gitignore
输入以下内容
*.swp
log/*.log
tmp/**/*
config/database.yml
然后 :wq 保存退出
git 默认会 replaced all of LF with CRLF
处理方式:git config core.autocrlf false

4、bundler安装
gem install bundler
这个如果是rails3的话,默认就会安装的

在项目下建立Gemfile文件,输入 source :gemcutter,然后保存退出
bundle install
会生成Gemfile.lock文件,是远程服务器和本地开发环境同步gem用的

5、heroku 安装创建
gem install heroku
heroku create alissa
=> Createing alissa....done
http://alissas.heroku.com/ | git@heroku.com:alissa.git
Git remote heroku added

6、代码上传
git add .
git commit -a -m "project first commit"
git push heroku master


git.exe push --progress "heroku" master


-----> Heroku receiving push
-----> Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
Fetching source index for http://rubygems.org/
Installing rake (0.8.7)
Installing RedCloth (4.2.7) with native extensions
Installing aaronh-chronic (0.3.9)
Installing abstract (1.0.0)
Installing activesupport (3.0.4)
Installing builder (2.1.2)
Installing i18n (0.5.0)
Installing activemodel (3.0.4)
Installing erubis (2.6.6)
Installing rack (1.2.1)
Installing rack-mount (0.6.13)
Installing rack-test (0.5.7)
Installing tzinfo (0.3.24)
Installing actionpack (3.0.4)
Installing mime-types (1.16)
Installing polyglot (0.3.1)
Installing treetop (1.4.9)
Installing mail (2.2.15)
Installing actionmailer (3.0.4)
Installing arel (2.0.8)
Installing activerecord (3.0.4)
Installing activeresource (3.0.4)
Installing coderay (0.9.7)
Installing formtastic (1.2.3)
Installing lesstile (1.0.1)
Installing ruby-openid (2.1.8)
Installing rack-openid (1.2.0)
Using bundler (1.0.7)
Installing thor (0.14.6)
Installing railties (3.0.4)
Installing rails (3.0.4)
Installing sqlite3 (1.3.3) with native extensions
Installing sqlite3-ruby (1.3.3)
Installing will_paginate (3.0.pre2)
Your bundle is complete! It was installed into ./.bundle/gems/
Compiled slug size is 5.4MB
-----> Launching... done
http://sawyer.heroku.com deployed to Heroku

To git@heroku.com:sawyer.git
* [new branch] master -> master
Success
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值