Skip to content

Instantly share code, notes, and snippets.

@tatsuosakurai
Created September 15, 2011 23:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tatsuosakurai/1220747 to your computer and use it in GitHub Desktop.
Save tatsuosakurai/1220747 to your computer and use it in GitHub Desktop.
Rubyセミナー資料1
# Railsプロジェクトの作成
rails new book_memo
# Railsプロジェクトフォルダへ移動
cd book_memo
# 必要なGemのインストール
bundle
# モデルの作成
rails g model book title:string memo:text
# 間違えたときには g を destroy にすると生成したファイルを削除しれくれるので便利
# マイグレーション
rake db:migrate
# Routesの確認
rake routes
# コントローラの作成
rails g controller books
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment