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 4.2→5.2アップデート
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
horikawa
May 29, 2019
Programming
470
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rails 4.2→5.2アップデート
Rails 4.2を5.2にアップデートした時の流れをまとめました。
horikawa
May 29, 2019
More Decks by horikawa
See All by horikawa
Caching associations in rails
casix
1
340
Create Action Mailbox Sample Application
casix
1
450
Rails 6.0 Action Mailboxについて
casix
0
410
Other Decks in Programming
See All in Programming
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
150
Groovy as a human and AI friendly programming language
paulk
0
140
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
190
AI Augmentation Techniques with Liberty
ivargrimstad
0
170
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.2k
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
240
Kotlinの15年とServer-Side Kotlin
n_takehata
1
170
AmebaブログはKMPから卒業します
kmars0605
0
310
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
140
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
320
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
650
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
4.9k
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
23k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
Unsuck your backbone
ammeep
672
58k
Navigating Team Friction
lara
192
16k
Bash Introduction
62gerente
615
220k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
340
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
330
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
290
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
520
For a Future-Friendly Web
brad_frost
184
11k
Transcript
Rails 4.2→5.2ʹ Ξοϓσʔτͨ͠ ງʢ@CASIXx1ʣגࣜձࣾπΫϧό
• ීஈʮcowcamoʯͱ͍͏ΞϓϦΛ։ൃͯ͠ ·͢ • αʔόαΠυɺRailsΛͬͯ·͢
࣮ͦΜͳʮcowcamoʯ ϲ݄લ·Ͱ...
Rails 4.2!!!
Ruby 2.3!!!
্͛ͳ͖Όʢ໋ײʣ
gemͷΞοϓσʔτ ͔ͨ͜͠͠ͱͳ͍Μ͕ͩ...
ʙ४උฤʙ
·ͣɺRubyΛ2.5ʹ্͛Α͏ ʢ࣌ɺ201811݄ࠒʣ
্͛ͨ Τϥʔग़ͳ͔ͬͨ
্͛Δ࣌ʹɺ ͍ͭͰʹRailsΞοϓσʔτ Ͱ͑ΔͷΛ༻ҙͨ͠
ಈ࡞֬ೝ߲ॻΛ࡞͓͍ͬͯͨ • ಈ࡞֬ೝͷγφϦΦΛ࡞Γ • ސ٬ͷಈ࡞Λ࠷ݶ୲อ͍ͨ͠ϥΠϯ • ۀ্ΫϦςΟΧϧͳՕॴ୲อ͍ͨ͠ͳ ͲΛఆٛ • ͦΕΛݩʹ߲ॻΛ࡞
ͱ͍͑ɺ ͜Ε͚ͩͰ৺ͱͳ͍...
ϦάϨογϣϯςετ ڧԽͤͶ
ϢχοτςετͷΧόϨοδΛ 80% ͙Β͍·Ͱ্͛ͨ
Issueࣄલ༻ҙ͠ͳ͖Ό
͝ஸೡʹΞοϓάϨʔυΨΠυ͕ ༻ҙ͞ΕͯΔͧʂ
ྔগͳw
None
...ϦϦʔεϊʔτΛݟΑ͏
Issue༻ҙ • 5.0, 5.1, 5.2 ͷϦϦʔεϊʔτͱʮcowcamoʯͷ ίʔυΛൺֱͯ͠ɺରԠ͖͢issueΛͬͨ • ࠓճɺେྔʹissue͕ग़ͦ͏ͳͷͰɺ֤όʔδϣϯ ͱ༏ઌͰϥϕϧΛ࡞͓͍ͬͯͨʢ͜Εྑ͔ͬ
ͨͰ͢ʂʣ • Rails5.0:MUST, Rails5.0:SHOULDΈ͍ͨͳ...
Αʔ͠ɺ্͛Δ͔ʔ
Rails 5.0
खॱ • Rails 5.0ʹ্͛Δ 1. ϦάϨογϣϯςετͰΤϥʔग़Δ 2. Issueʹ͢Δ 3. मਖ਼͢Δͷϧʔϓ
• ࣄલ༻ҙͨ͠IssueফԽ͍ͯ͘͠
͜͜Ͱ͔ͬͨ͜ͱ...
ϦϦʔεϊʔτʹࡌͬͯͳ͍ มߋͰͨ͘͞ΜΤϥʔ͕ग़ͨ
ͬͱফԽͨ͠ʂ ͱࢥ͍͖
લͰൃੜ
Rails 4.2Ͱ࡞ͨ͠ δϣϒΛ͑ͳ͍
σγϦΞϥΠζͰ͖ͳ͍ • Rails 4.2ͷ࣌ʹδϣϒΛ ϚʔγϟϧγϦΞϥΠζ͍ͯͨ͠ • Rails 4.2ʹ͋ͬͯɺ5.0ʹͳ͍ΫϥεΛؚΊͯγϦ ΞϥΠζ͍ͯͨ͠ͷͰɺσγϦΞϥΠζ͢Δࡍʹɺ ఆΤϥʔ͕ൃੜ
• ActiveRecord::ConnectionAdapters::AbstractMysql Adapter::MysqlDateTimeͱ͔...
ղܾࡦ • δϣϒ • Rails 4.2ʹ͋ͬͯɺRails 5.0ʹͳ͍Ϋϥε ɺμϛʔͰఆٛͨ͠ • 4.2ͷδϣϒΛফԽͨ͠Βɺআ
Rails 4.2͔Βෳ
͍ͭʹϦϦʔεʂʂ
ޭʂ ͔͠ϊʔΤϥʔͩͱ...!?
ଓ͍ͯ5.1ʂ
Rails 5.1
5.1Ͱগۤ͠࿑ͨ͠Օॴ
uniq→distinctมߋ • ActiveRecordͱ ActiveRecord::ActiveRecord_Relationͷ uniqϝιου͕distinctϝιουʹมߋ͞Εͨ
uniq→distinctมߋ • ActiveRecord::ActiveRecord_Relation Array ͷuniqϝιουΛҕৡ͍ͯ͠ΔͷͰɺ uniq→distinctʹ͠Εͯɺ NoMethodError͕ग़ͳ͍... • ·ͨɺArrayͰҾ͖ଓ͖ɺuniqΛ͏ͷͰɺ શͯdistinctʹ͍͍ͤΘ͚Ͱͳ͍
Rails 5.2
image_tagͷมߋ͕...
image_tag • CarrierWaveͷUploaderͬͯ͋Δ͡Όͳ͍Ͱ ͔͢
image_tag • ࠓ·Ͱɺ image_tag(@image_uploader_object)Έ͍ͨ ʹ ΠϝʔδΞοϓϩʔυΦϒδΣΫτΛೖΕͯ ͳΜ͔Μͯ͘͠Ε͕ͨɺͯ͘͠Εͳ͘ͳͬ ͨ
image_tag • ۩ମతʹɺ • Can't resolve image into URL: undefined
method `to_model' for #<MyUploader:xxxxxxxxxx> Did you mean? to_xml • ͳΔΤϥʔ͕ग़·͢
image_tagղܾࡦ • ୈҰҾʹɺURLͷจࣈྻΛͤͱͷ͜ ͱͩͬͨͷͰ • image_tag(@image_uploader_object) ↓ image_tag(@image_uploader_object.url) • ʹॻ͖͑ͨ
ͪͳΈʹ • mount_uploader :url, MyUploaderΈ͍ͨʹॻ ͍͍ͯΔͱ... • image_tag(@profile_image.url.url) Έ͍ͨʹ ͳΓ·͢
ŘşũūŘ
·ͱΊ
ྑ͔ͬͨͱ͜Ζ • ϢχοτςετͷΧόϨοδΛ80%ॻ͍ͨ • ઈରʹΤϥʔग़ͨ͘͠ͳ͍Օॴɺ ಈ࡞֬ೝ߲ॻΛ࡞ͯ͠ɺखಈͰͷ֬ೝΛͨ͜͠ͱ • ݹ͍ڥ(4.2)→৽͍͠ڥ(5.0ͳͲ)ͷ֬ೝΛͨ͜͠ ͱ •
ηογϣϯɾδϣϒͷෆ۩߹Λݟ͚ͭΒΕΔ
ఆ֎ͩͬͨՕॴ • ϦϦʔεϊʔτΛ֬ೝͨ͠Βɺेͩͱࢥ͍ ࠐΜͰ͍͕ͨɺ ϦϦʔεϊʔτʹͳ͍มߋͳͲΤϥʔ͕ग़ ͍ͯͨ(શମͷ30~40%͙Β͍) • ϦάϨογϣϯςετΛॻ͍ͯɺ্͛ͯɺΤ ϥʔΛ௵͍ͯ͘͠ํ͕ϝΠϯʹͳΓͦ͏
None
RailsΞοϓσʔτ ϊʔΤϥʔͰͨ͠ ☀