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プロジェクトで導入した開発環境
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
naoty
February 18, 2015
Programming
1.2k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
久々のRailsプロジェクトで導入した開発環境
naoty
February 18, 2015
More Decks by naoty
See All by naoty
Modular API Client
naoty
1
440
Repository pattern in Swift
naoty
3
6.5k
Timepiece
naoty
0
3.8k
Contribution to Rails
naoty
0
4.4k
Report of DIYish programming activity
naoty
1
300
How to build gems for Rails
naoty
1
190
Qiita/Kobito vs ?
naoty
0
210
Other Decks in Programming
See All in Programming
Performance Engineering for Everyone
elenatanasoiu
0
210
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
590
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
13
6.2k
RTSPクライアントを自作してみた話
simotin13
0
630
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.5k
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
740
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
160
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
610
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
190
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
180
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
2
730
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
370
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
300
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Six Lessons from altMBA
skipperchong
29
4.3k
The Invisible Side of Design
smashingmag
301
52k
Design in an AI World
tapps
1
250
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
200
How to Ace a Technical Interview
jacobian
281
24k
Transcript
ٱʑͷRailsϓϩδΣΫτͰ ಋೖͨ͠։ൃڥ Naoto Kaneko
tl;dr • ࠷ۙస৬ͯ͠ٱʑʹνʔϜͰRailsϓϩδΣΫτ ΛࢀՃ͢Δ͜ͱʹͳͬͨɻ • ։ൃڥʹ·ͭΘΔτϥϒϧͰ͕࣌ؒͱΒΕΔ ͷͰνʔϜͷ։ൃڥΛඋ͢Δ͜ͱʹͨ͠ɻ • ͘͝ී௨ͷ։ൃڥ͔͠Εͳ͍͚Ͳɺଞࣾ ͷऔΓΈΛΓ͍ͨɻ
None
None
ܦҢ • 1΄ͲϕϯνϟʔͰ1ਓͰiOS+Railsͷ։ൃ • ࡢʹେاۀʹస৬ˠ10໊ఔͷνʔϜʹ ଐ͞ΕRailsઐۀʹ • ৽نϓϩδΣΫτͷॳظϑΣʔζͰjoin • νʔϜͰͷRailsϓϩδΣΫτ3ͿΓ
τϥϒϧ • ϦϞʔτͰ࡞ۀ͢Δ։ൃऀͷ։ൃڥͰى͖ͨ τϥϒϧͷղܾඇৗʹࠔ • ։ൃσʔλ͕ෳࡶͰηοτΞοϓ͕ࠔ • ίʔυϨϏϡʔͷͨΊʹଞͷbranchʹҠͬͨΒ εΩʔϚ͕ҟͳ͍ͬͯͯຖճrake db:reset
• ίʔσΟϯάن͕ͳͯ͘ελΠϧ͕όϥόϥ
։ൃڥͷ౷Ұ • ։ൃڥͷτϥϒϧΛ࠷খݶʹ͑ΔɻϦϞʔ τͰ࡞ۀ͢Δ߹ͰରॲՄೳ • Vagrant + Chef SoloͰڥߏஙͷࣗಈԽ͓Α ͼܗࣜԽ
• ߏஙͨ͠ڥboxԽͯ͠vagrant upͷ࣌ؒΛ ॖʢ༧ఆʣ
Tips: vagrant-exec % vagrant plugin install vagrant-exec % vbin/rails s
Vagrant.configure(2) do |config| config.exec.commands = %w(rails) config.exec.binstubs_path = “vbin” end
։ൃσʔλͷηοτΞοϓ • FactoryGirlͰ։ൃσʔλͷఆٛ • FactoryGirl͔ΒσʔλΛੜ͢ΔRakeλεΫΛ༻ ҙ͢Δ • db/seeds.rbෳࡶͳґଘؔΛͭσʔλͷ࡞ ʹ͔ͳ͍ͨΊΘͳ͍ •
ϦϦʔεޙຊ൪ڥͷσʔλΛྲྀ༻͢Δखݕ౼
db/seeds.rb Country.create(name: “Japan”) Prefecture.create(name: “Tokyo”, country: Country.first) City.create(name: “Meguro”, prefecture:
Prefecture.first) User.create(name: “naoty”, city: City.first) % rake db:seed
lib/tasks/seeds.rake task :countries => %i(environment) do create(:countries) end task :prefectures
=> %i(environment countries) do create(:prefectures, country: Country.first) end task :cities => %i(environment prefectures) do create(:cities, prefecture: Prefecture.first) end task :users => %i(environment cities) do create(:users, city: City.first) end % rake seeds:users
branchସ͑ͨΒεΩʔϚͷΤϥʔ • ෳͷbranchΛಉ࣌ซߦͰਐΊ͍ͯΔͱ͖ • ίʔυϨϏϡʔରͷbranchʹҠͬͨͱ͖ • branch͝ͱʹεΩʔϚ͕ҟͳͬͯΤϥʔ͕ى ͖Δ͜ͱ͕Α͋͘Δɻ
brancher • https://github.com/naoty/brancher • branch͝ͱʹଓ͢ΔDBΛΓସ͑Δ rubygemΛॻ͍ͯΈͨɻ • branch͝ͱʹDB͕Ͱ͖ΔͷͰΰϛDBΛআ ͢ΔεΫϦϓτΛॻ͍ͯӡ༻
࣭ͷอূ • rubocopಋೖˠίʔσΟϯάنͰ࠷ݶͷ ࣭ͷ୲อ • ΑΓߴ͍࣭ΛอͭͨΊʹ rails_best_practices, brakeman, code climate
ʢ༗ྉ൛ʣͳͲΛݕ౼த • ಛʹଞࣾͷݟΛฉ͍ͯΈ͍ͨͱ͜Ζ
·ͱΊ • Vagrant + Chef soloͰ౷Ұ͞Εͨ։ൃڥ • FactoryGirlΛͬͨRakeλεΫͰෳࡶͳ։ൃσʔ λͷηοτΞοϓ •
brancherͰbranchؒͷεΩʔϚͷҧ͍ʹΑΔτϥ ϒϧΛճආ • rubocopͰ࠷ݶͷ࣭Λ୲อ
None
RailsΤϯδχΞืूத!!!