Skip to content

Instantly share code, notes, and snippets.

@knknkn1162
Last active November 10, 2016 12:44
Show Gist options
  • Save knknkn1162/d66f4f3d43018e0072cf05ebee8abe63 to your computer and use it in GitHub Desktop.
Save knknkn1162/d66f4f3d43018e0072cf05ebee8abe63 to your computer and use it in GitHub Desktop.
rail tutorial 勉強メモ (1~7章) ref: http://qiita.com/knknkn1162/items/209f3c4b975438a1a8d7
GemfileにいれたいGemパッケージをかきかき
==> Gemfileを`bundle install`
==> 依存ファイルもろとも、バージョンがGemfile.lockに書き込まれる。
<== Gemfile.lockがない状態で、他の環境で後日`bundle install`
==> 依存ファイルのバージョンが違ってしまい、同一環境で開発ができない!
$ git init
$ git add -A
$ git commit -m "commit"
# あらかじめhttps://github.comに行って、ユーザー登録して、New Repositoryのボタンをポチッと押して、
# sample_appレポジトリを作っておきましょう。(忘れると、sshは?とか色々聞かれてハマリます
$ git remote add origin https://github.com/<username>/sample_app.git
# -uはレポジトリとブランチの対応付け(2回目以降は同じならば省略できる)
# gitに慣れないうちは、git pushの引数とかは省略せずに書く方が吉!
$ git push -u origin <master or branch-name>
# 本番環境にデプロイ (deploy: デプロイ) する場合
$ heroku login
$ heroku keys:add
$ heroku create
#もしくは、heroku create <herokuのアプリ名>
$ git push <herokuのアプリ名 or heroku> master
$ git add -A
$ git commit -m "commit"
$ git push -u origin <master or branch-name>
# 本番環境にデプロイ (deploy: デプロイ) する場合
$ git push <herokuのアプリ名 or heroku> master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment