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
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
どこまでゆるくて許されるのか
tk3fftk
0
500
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
140
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
8
4.4k
yield再入門 #phpcon
o0h
PRO
0
470
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
460
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
0
280
Embedded SREと共に達成した会員管理システムのAWS移行 - SRE NEXT 2026 ランチスポンサーセッション
niftycorp
PRO
1
2.6k
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
330
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
140
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
140
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
150
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
390
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
460
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
220
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
390
The untapped power of vector embeddings
frankvandijk
2
1.8k
Practical Orchestrator
shlominoach
191
11k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
660
For a Future-Friendly Web
brad_frost
183
10k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
150
Building Flexible Design Systems
yeseniaperezcruz
330
40k
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ΤϯδχΞืूத!!!