Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
rails-master-road-1.pdf
Search
chionyan
February 15, 2019
Programming
0
85
rails-master-road-1.pdf
chionyan
February 15, 2019
Tweet
Share
More Decks by chionyan
See All by chionyan
レンタルカメラ広告提案資料
chionyan
0
720
Other Decks in Programming
See All in Programming
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
590
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.4k
Deno Tunnel を使ってみた話
kamekyame
0
250
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
460
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.8k
PC-6001でPSG曲を鳴らすまでを全部NetBSD上の Makefile に押し込んでみた / osc2025hiroshima
tsutsui
0
190
AIコーディングエージェント(Manus)
kondai24
0
220
開発に寄りそう自動テストの実現
goyoki
2
1.4k
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
ゲームの物理 剛体編
fadis
0
370
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
130
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
Featured
See All Featured
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
230
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
0
100
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.4k
Test your architecture with Archunit
thirion
1
2.1k
Fireside Chat
paigeccino
41
3.8k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
51
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.7k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
89
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
What does AI have to do with Human Rights?
axbom
PRO
0
1.9k
Transcript
Ruby on Rails Master への道 〜導入編〜 @chionyan 公開日時:2019/2/15
Rails でアプリを作るのは超簡単!
超簡単 Rails 下準備をする // プロジェクトを作る $ rails new sample-app //
ライブラリを入れる $ bundle install
超簡単 Rails // User に関する色々を作ってくれる $ rails generate scaffold User
name:string em // DB を作る $ rails db:migrate データを操作する色々を作る
超簡単 Rails $ rails server サーバーを起動する
超簡単 Rails できました!
超簡単 Rails User を作成することもできる!
超簡単 Rails User を作成することもできる!
超簡単 Rails 一覧にも出てくる!
すごーい!!!
Rails チュートリアル Rails チュートリアルでは、 scaffold がよしなにやってくれた内容を、 ・Routing ・Model ・Controller ・View
・バリデーション、関連、セッション... など一つ一つ基礎の部分を写経して、 アプリケーションを作っていく。
でも、、
実際何やってるの??
Ruby を知る ポテンシャルエンジニア研修で も使った名著。 Rails のフレームワークで使われ ている Ruby について丁寧に解 説してある。
まずはこれで Ruby を知ろう。 「プロを目指す人のための Ruby 入門」
Rails を知ろう 「Ruby on Rails ガイド」
Ruby on Rails ガイド ガイド目次です。 さっき4つくらいのコマンドで 終わったことや、モデル、ビュ ー、コントローラーで行われて いることもここで細かく説明さ れています。
多い・・・。
ちょっとだけ見せ
Active Record マイグレーション # 下記のコードが作成される(DB 作る用) class AddLocationToUsers < ActiveRecord::Migration
def change add_column :users, :location, :string end end // users テーブルに location カラムを追加する $ rails g migration AddLocationToUsers locati // DB を更新する $ rails g db:migrate
Active Record マイグレーション class AddLocationToUsers < ActiveRecord::Migration def up add_column
:users, :location, :string end def down remove_column :users, :location, :string end end こう手直しした方が融通が効きやすい!! (可逆性がある)
そういうことがわかります。。
もっと知りたい人は、
こことか、こことか
rails / rails User を作成することもできる!
読めたらいいな。。。
おしまい