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
Upgrading Rails Redux
Search
Nathan Youngman
January 19, 2016
Technology
1
97
Upgrading Rails Redux
A refresh of my talk on upgrading Rails.
Nathan Youngman
January 19, 2016
Tweet
Share
More Decks by Nathan Youngman
See All by Nathan Youngman
The Healthy Programmer
nathany
2
110
Go and Node.js: a comparison
nathany
1
240
Diet Hacks
nathany
2
390
Go 1.6 and HTTP/2
nathany
3
150
GopherCon recap
nathany
0
190
Go Functions
nathany
0
100
Go Arrays & Slices
nathany
0
150
Go Types
nathany
2
130
Go Packages
nathany
2
560
Other Decks in Technology
See All in Technology
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
470
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
140
Context Engineeringの取り組み
nutslove
0
340
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
230
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.4k
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
380
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
200
FinTech SREのAWSサービス活用/Leveraging AWS Services in FinTech SRE
maaaato
0
130
登壇駆動学習のすすめ — CfPのネタの見つけ方と書くときに意識していること
bicstone
3
100
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
配列に見る bash と zsh の違い
kazzpapa3
1
150
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
94
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
830
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
Docker and Python
trallard
47
3.7k
Exploring anti-patterns in Rails
aemeredith
2
250
Chasing Engaging Ingredients in Design
codingconduct
0
110
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
100
How to Talk to Developers About Accessibility
jct
2
130
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
220
Transcript
Upgrading Rails Redux
Who has a Rails app in production?
Rails 1.x
Rails 2.x
Rails 3.x
None
Porting to Rails 4 Sometimes the new code still works
in old version of Rails. scope :sorted, order(“updated_at") scope :sorted, -> { order("updated_at") }
Porting to Rails 4 Otherwise branch?
Dual-boot Rails # Gemfile def rails4? ENV["RAILS4"] == '1' end
RAILS4=1 rails s
# Gemfile if rails4? gem "rails", “4.0.5" # protected_attributes,
etc. else gem "rails", "3.2.18" end Dual-boot Rails
# config/environments/test.rb ActiveSupport::Deprecation.silenced = true if rails4? Dual-boot
Rails
RailsDiff
Incremental progress • Boot Server • Run Tests (Rails 3
& 4) • Passing Tests • QA • Switch Default Rails
whoops • Non-digest images in emails, use public/ • Blocks
iframe embedding response.headers.except! ‘X-Frame-Options' • Endpoints protect_from_forgery exceptions (CSRF) xml_data = Hash.from_xml(request.body.read) • Threading bug in activerecord-session_store
if rails_master? # gem "rails", :github => "rails/rails", :branch =>
"4-2-stable" gem "rails", "5.0.0.beta1" else gem "rails", "4.2.5" end
Resources • https://github.com/discourse/discourse/ blob/master/Gemfile • http://railsdiff.org/ • https://speakerdeck.com/nathany/ upgrading-rails-redux
Gopher Gala edmontongo.org
https://yng.mn/39youngman