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
710
rails new コマンド
銀座Rails#41 LT
Yasuhiroki
January 25, 2022
Tweet
Share
More Decks by Yasuhiroki
See All by Yasuhiroki
自分に勉強させるには
yasuhiroki
1
390
Android Studio `Command+Shift+A`
yasuhiroki
0
320
シェルスクリプトをサーバーレスで cron したい
yasuhiroki
1
770
自動化を習慣化する
yasuhiroki
2
14k
GitHub Actions Parallel Testing
yasuhiroki
1
1.2k
circleci.vim
yasuhiroki
0
1.5k
ベンチャー企業がCircleCIを選んだ理由と活用方法
yasuhiroki
1
770
Rubyの正規表現を調べてみた
yasuhiroki
0
800
開発者(個人)のためのJenkins 運用編
yasuhiroki
0
2.2k
Other Decks in Technology
See All in Technology
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
260
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
130
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
870
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
490
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
580
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
360
2024年にチャレンジしたことを振り返るぞ
mitchan
0
140
複雑性の高いオブジェクト編集に向き合う: プラガブルなReactフォーム設計
righttouch
PRO
0
120
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
270
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
600
終了の危機にあった15年続くWebサービスを全力で存続させる - phpcon2024
yositosi
19
17k
10分で学ぶKubernetesコンテナセキュリティ/10min-k8s-container-sec
mochizuki875
3
360
Featured
See All Featured
Become a Pro
speakerdeck
PRO
26
5k
Writing Fast Ruby
sferik
628
61k
How to Ace a Technical Interview
jacobian
276
23k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
We Have a Design System, Now What?
morganepeng
51
7.3k
Facilitating Awesome Meetings
lara
50
6.1k
4 Signs Your Business is Dying
shpigford
181
21k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Done Done
chrislema
181
16k
RailsConf 2023
tenderlove
29
940
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