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プロジェクトで導入した開発環境
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
450
Repository pattern in Swift
naoty
3
6.5k
Timepiece
naoty
0
3.9k
Contribution to Rails
naoty
0
4.4k
Report of DIYish programming activity
naoty
1
300
How to build gems for Rails
naoty
1
200
Qiita/Kobito vs ?
naoty
0
220
Other Decks in Programming
See All in Programming
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
360
Verilogで学ぶCPU自作入門.pdf
uyuki234
6
2.7k
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
520
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
160
速習iPhone Duo対応
yuukiw00w
2
720
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
5
4.5k
FreeBSDでZabbixを動かす
kenkino
0
320
wkhtmltopdfの次どうするか問題2026
willnet
2
1.6k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
8.3k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
320
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
240
AWSに止められる覚悟してますか?
morizo_1984
0
150
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Technical Leadership for Architectural Decision Making
baasie
3
580
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
New Earth Scene 8
popppiees
4
2.6k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Raft: Consensus for Rubyists
vanstee
142
7.7k
Become a Pro
speakerdeck
PRO
31
6.3k
First, design no harm
axbom
PRO
2
1.3k
Everyday Curiosity
cassininazir
0
320
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
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ΤϯδχΞืूத!!!