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
230
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
かわいい身体と声を持つ そういうものに私はなりたい
yoshimura_datam
0
540
2026年はチャンキングを極める!
shibuiwilliam
7
1.3k
M5Stack Chain DualKey を UIFlow 2.0 + USB接続で試す / ビジュアルプログラミングIoTLT vol.22
you
PRO
2
120
Werner Vogelsが14年間 問い続けてきたこと
yusukeshimizu
2
240
ビジュアルプログラミングIoTLT vol.22
1ftseabass
PRO
0
140
Zephyr RTOS の発表をOpen Source Summit Japan 2025で行った件
iotengineer22
0
280
Amazon Bedrock AgentCore EvaluationsでAIエージェントを評価してみよう!
yuu551
0
180
Amazon Bedrock AgentCore 認証・認可入門
hironobuiga
1
300
CodeRabbit CLI + Claude Codeの連携について
oikon48
1
670
SMTP完全に理解した ✉️
yamatai1212
0
110
最速で価値を出すための プロダクトエンジニアのツッコミ術
kaacun
1
300
GitHub Copilot CLI 現状確認会議
torumakabe
12
4.9k
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Thoughts on Productivity
jonyablonski
74
5k
The browser strikes back
jonoalderson
0
340
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
72
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
85
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
570
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
120
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
260
Producing Creativity
orderedlist
PRO
348
40k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
300
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