1、新建一个本地APP,并且进入该目录
$ cd ˜/rails_projects
$ rails new demo_app
$ cd demo_app
2、使用文本编辑器打开gemfile文档,修改其中的sqlite
gem 'rails', '3.0.0'
gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
3、重新安装bundle
$ bundle install
4、添加本地的版本控制:
$ git init
$ git add .
$ git commit -m "Initial commit"
5、新建一个github上的repo(注意,全部默认就好,不要选择那个readme)
$ git remote add origin git@github.com:<username>/demo_app.git
$ git push origin master
结果如下:
John@JOHN-PC /g/ruby/demo_app (master)
$ git push origin master
Counting objects: 63, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (48/48), done.
Writing objects: 100% (63/63), 86.11 KiB, done.
Total 63 (delta 2), reused 0 (delta 0)
To git@github.com:dearjohn/demo_app.git
* [new branch] master -> master