Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
rails-master-road-1.pdf
Search
chionyan
February 15, 2019
Programming
96
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
rails-master-road-1.pdf
chionyan
February 15, 2019
Transcript
25 slides
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 を作成することもできる!
読めたらいいな。。。
おしまい
More Decks by chionyan
See All by chionyan
レンタルカメラ広告提案資料
chionyan
0
760
Other Decks in Programming
See All in Programming
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
640
AppFunctionsの内部実装を紐解く
hiroaki404
1
120
Ruby から Emacs を操作したい
phigasui
0
390
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
890
Skills Are the New npm [AAIF Bengaluru, Nov 2026]
shivamsaraswat
0
130
Math.sumPreciseから学ぶ、ECMAScript仕様の数値の種類
syumai
0
180
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
500
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
17
9.5k
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
130
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
440
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
420
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
The untapped power of vector embeddings
frankvandijk
2
2k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
970
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
520
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The SEO Collaboration Effect
kristinabergwall1
1
630
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
690
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
350
The Language of Interfaces
destraynor
163
27k