Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
rails new コマンド
Search
Yasuhiroki
January 25, 2022
Technology
1
700
rails new コマンド
銀座Rails#41 LT
Yasuhiroki
January 25, 2022
Tweet
Share
More Decks by Yasuhiroki
See All by Yasuhiroki
自分に勉強させるには
yasuhiroki
1
380
Android Studio `Command+Shift+A`
yasuhiroki
0
310
シェルスクリプトをサーバーレスで cron したい
yasuhiroki
1
760
自動化を習慣化する
yasuhiroki
2
14k
GitHub Actions Parallel Testing
yasuhiroki
1
1.2k
circleci.vim
yasuhiroki
0
1.5k
ベンチャー企業がCircleCIを選んだ理由と活用方法
yasuhiroki
1
760
Rubyの正規表現を調べてみた
yasuhiroki
0
780
開発者(個人)のためのJenkins 運用編
yasuhiroki
0
2.2k
Other Decks in Technology
See All in Technology
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
120
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
【若手エンジニア応援LT会】ソフトウェアを学んできた私がインフラエンジニアを目指した理由
kazushi_ohata
0
150
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
170
SSMRunbook作成の勘所_20241120
koichiotomo
1
110
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
180
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
1
2.3k
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
150
Lexical Analysis
shigashiyama
1
150
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.3k
Terraform未経験の御様に対してどの ように導⼊を進めていったか
tkikuchi
2
430
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
88
5.7k
Designing the Hi-DPI Web
ddemaree
280
34k
A Modern Web Designer's Workflow
chriscoyier
693
190k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Making Projects Easy
brettharned
115
5.9k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Why Our Code Smells
bkeepers
PRO
334
57k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Producing Creativity
orderedlist
PRO
341
39k
Transcript
SBJMTOFXίϚϯυ !ZBTVIJSPLJ ۜ࠲3BJMT
!ZBTVIJSPLJ w झຯࢠͲͷ$IBOHF-PHΛॻ͘
!ZBTVIJSPLJ w ࣄΈΜνϟϨ 3BJMT"84"OESPJE
!ZBTVIJSPLJ w ࣄΈΜνϟϨ 3BJMT"84"OESPJE
IBQQZOFXZFBS
OPUGPVOE
IBQQZ࡞ΕΔ
IBQQZ࡞ΕΔ BMJBTIBQQZSBJMT
None
IBQQZOFXZFBS w ৽ϓϩδΣΫτΛ࡞Δ
VOBMJBTIBQQZ
SBJMTOFX Ͳ͏࣮ͬͯ͞Ε͍ͯΔʁ
SBJMTOFXZFBS ࣮ߦͨ͠ͱ͖ͷίʔυΛಡΉ
fi OESBJMTDPNNBOE w SBJMUJFTʹ͋Δ
WJNSBJMUJFTFYFSBJMT rails ։ൃऀ͚
WJNSBJMUJFTMJCSBJMTDMJSC
WJNSBJMUJFTMJCSBJMTDMJSC # TODO: ͋ͱͰಡΉ
WJNSBJMUJFTMJCSBJMTDMJSC rails plugin ίϚϯυҎ֎ͯ͢ rails application ѻ͍ # TODO: ͋ͱͰಡΉ
دΓಓ SBJMTOFXZFBSҎ֎Ͱ ಈ͘ͷͰʁ
دΓಓ ಈ͔ͳ͍
WJNSBJMUJFTMJCSBJMTDMJSC w 3BJMT$PNNBOEJOWPLFBQQMJDBUJPO <OFX ZFBS>͕࣮ߦ͞ΕΔ
3BJMT$PNNBOEJOWPLF
3BJMT$PNNBOEJOWPLF ໋໊نଇʹैͬͯ Rails::Command Λ ܧঝͨ͠ΫϥεΛ୳͢ → Rails::Command::ApplicationCommand namespace = "application"
3BJMT$PNNBOE"QQMJDBUJPO$PNNBOE w 3BJMT$PNNBOE"QQMJDBUJPO$PNNBOEQFSGPS N BQQMJDBUJPO <OFX ZFBS> \^ ͕࣮ߦ͞ΕΔ
3BJMT$PNNBOEJOWPLF w SBJMTOFXHFOFSBUPSͷҰछ w IUUQTSBJMTHVJEFTKQHFOFSBUPSTIUNM
دΓಓ ॻ͍ͯΔ IUUQTSBJMTHVJEFTKQHFOFSBUPSTIUNM
3BJMT$PNNBOEJOWPLF w SBJMTOFXHFOFSBUPSͷҰछ w IUUQTSBJMTHVJEFTKQHFOFSBUPSTIUNM
3BJMT(FOFSBUPST"3(74DSVCCFS w "3(7Λ4DSVCͯ͠Δ w ൚༻ͦ͏ͳ໊લʹݟ͔͚ͤͯ ࣮3BJMT(FOFSBUPST"QQ(FOFSBUPS༻ w ࣮লུ
دΓಓ OFXҎ֎IFMQʹ͢Δ
دΓಓ ͔ͩΒSBJMTOFXͷΈಈ͘ "yasuhiroki" == "new" => false rails
--help year Λ࣮ߦͨ͜͠ͱʹͳΔ
3BJMT(FOFSBUPST"QQ(FOFSBUPS
3BJMT(FOFSBUPST"QQ(FOFSBUPS w 5IPSHFNΛར༻ w Φϓγϣϯ BQJͱ͔ Λղੳ w ςϯϓϨʔτ͔ΒϑΝΠϧΛಈతʹੜ w
SBJMTOFXͰԿ͕ͲͷΑ͏ʹੜ͞ΕΔͷ͔ ͯ͢͜͜ʹ࣮͞Ε͍ͯΔ
SBJMTOFXίϚϯυ Ҏ্ͷΑ͏ʹ࣮͞Ε͍ͯͨ
دΓಓ Կ͔Ε͍ͯΔؾ͕͢Δ
دΓಓ HSFQ50%0
دΓಓ HSFQ50%0
SBJMTOFXίϚϯυ͕ ಈ࡞͠ͳ͍ঢ়گ͕͋Δ
SBJMTOFX͕ಈ͔ͳ͍ w SBJMTϓϩδΣΫτ্ͩͱ SBJMTOFXಈ͔ͳ͍
WJNSBJMUJFTMJCSBJMTDMJSC ͍·ಡΉ
3BJMT"QQ-PBEFSFYFD@BQQ
3BJMT"QQ-PBEFSFYFD@BQQ bin/rails ͔ script/rails Λ୳͢ root (/) ʹͳΔ·ͰḪͬͯ୳͢
3BJMT"QQ-PBEFSFYFD@BQQ bin/rails script/rails ͕ ͳ͔ͬͨΒԿ͠ͳ͍
3BJMT"QQ-PBEFSFYFD@BQQ exec ruby bin/rails, *["new", "year"] Λ࣮ߦ͢Δ ※ ͜ͷลݹ͍ Rails
(ͨͿΜ3ܥ) ͚ͷॲཧ bin/rails ͕͋ͬͨΒɺ
,FSOFMFYFD w Ҿʹࢦఆͨ͠ίϚϯυ͕ޭͨ͠Βɺ ͦ͜Ͱ3VCZͷॲཧऴྃ͢Δ w IUUQTEPDTSVCZMBOHPSHKBMBUFTU NFUIPE,FSOFMNFYFDIUNM w
دΓಓ φϕΞπͰಈ࡞֬ೝ
WJNSBJMUJFTMJCSBJMTDMJSC bin/rails ͕͋Δ߹ɺ Ҏ߱ͷॲཧ࣮ߦ͞Εͳ͍
SVCZCJOSBJMTOFXZFBS w CJOSBJMTߦ 3BJMTͷ߹
SBJMTDPNBNOETSC Rails::Command.invoke "new", ["year"] Λ࣮ߦ͢Δ
3BJMT$PNNBOEJOWPLF"HBJO
3BJMT$PNNBOEJOWPLF"HBJO Rails::Command::NewCommand ͷ perform ͕ݺΕΔ namespace = "new"
3BJMT$PNNBOE/FX$PNNBOE w 3BJMTϓϩδΣΫτ্Ͱ࣮ߦͰ͖ͳ͍Α ϝοηʔδΛදࣔͯ͠FYJU͢Δ
SBJMTOFXίϚϯυ Ҏ্ͷΑ͏ʹ࣮͞Ε͍ͯͨ
5IBOLT