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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
210
Other Decks in Programming
See All in Programming
typoなんかねぇよ
raspython3
0
680
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
660
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
210
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
130
What We Talk About When We Talk About XP
m_seki
2
460
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
150
スマート反転とウェブアクセシビリティ
camiha
0
180
Laravelのアプリケーションをどこにデプロイするか #ツナギメオフライン.9
akase244
0
120
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
700
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
120
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
2
270
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
520
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
290
Visualization
eitanlees
152
17k
Evolving SEO for Evolving Search Engines
ryanjones
0
280
Mobile First: as difficult as doing things right
swwweet
225
10k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
330
Joys of Absence: A Defence of Solitary Play
codingconduct
1
500
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
250
Git: the NoSQL Database
bkeepers
PRO
432
67k
Design in an AI World
tapps
1
310
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
230
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
820
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ΤϯδχΞืूத!!!