Skip to content

Instantly share code, notes, and snippets.

@ymsrk
Last active June 16, 2017 10:21
Show Gist options
  • Save ymsrk/32fed8ab74833ab76b528122847d0e4f to your computer and use it in GitHub Desktop.
Save ymsrk/32fed8ab74833ab76b528122847d0e4f to your computer and use it in GitHub Desktop.
rails 新規プロジェクト

rails new project command memory's

ターミナルにはfishがインストールされている。
event-sandboxはプロジェクトの名前なので適宜読み替えること。

新規でプロジェクトを構築する手順

1.ディレクトリを作成する

$ mkdir event-sandbox; and cd event-sandbox;

2.gitを導入する

$ git init
Initialized empty Git repository in /Users/gulliver/github/event-sandbox/.git/

3.Gemfileを作成

$ bundle init
Writing new Gemfile to /Users/gulliver/github/event-sandbox/Gemfile

4.gem "rails"のコメントを取り除く

$ vi Gemfile

- # gem "rails"
+ gem "rails"  

5.".ruby-versions"を作成

$ rbenv local 2.4.0

6.bundle installを実行

$ bundle install --path /vendor/bundler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment