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
Wvlet: A New Flow-Style Query Language For Functional Data Modeling and Interactive Data Analysis - Trino Summit 2024
xerial
1
110
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
190
なぜCodeceptJSを選んだか
goataka
0
150
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
260
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1k
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
540
5分でわかるDuckDB
chanyou0311
10
3.2k
AIのコンプラは何故しんどい?
shujisado
1
190
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
2
240
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
110
2024年にチャレンジしたことを振り返るぞ
mitchan
0
130
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
RailsConf 2023
tenderlove
29
940
YesSQL, Process and Tooling at Scale
rocio
169
14k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
94
BBQ
matthewcrist
85
9.4k
It's Worth the Effort
3n
183
28k
We Have a Design System, Now What?
morganepeng
51
7.3k
For a Future-Friendly Web
brad_frost
175
9.4k
Rails Girls Zürich Keynote
gr2m
94
13k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Building an army of robots
kneath
302
44k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
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