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
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