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
94
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
220
Diet Hacks
nathany
2
370
Go 1.6 and HTTP/2
nathany
3
140
GopherCon recap
nathany
0
180
Go Functions
nathany
0
100
Go Arrays & Slices
nathany
0
140
Go Types
nathany
2
130
Go Packages
nathany
2
550
Other Decks in Technology
See All in Technology
AWSにおけるTrend Vision Oneの効果について
shimak
0
130
バイブコーディングと継続的デプロイメント
nwiizo
2
430
コンテキストエンジニアリングとは? 考え方と応用方法
findy_eventslides
4
900
PLaMoの事後学習を支える技術 / PFN LLMセミナー
pfn
PRO
9
3.8k
Escaping_the_Kraken_-_October_2025.pdf
mdalmijn
0
130
BtoBプロダクト開発の深層
16bitidol
0
320
LLMアプリケーション開発におけるセキュリティリスクと対策 / LLM Application Security
flatt_security
7
1.9k
GC25 Recap+: Advancing Go Garbage Collection with Green Tea
logica0419
1
410
成長自己責任時代のあるきかた/How to navigate the era of personal responsibility for growth
kwappa
3
270
空間を設計する力を考える / 20251004 Naoki Takahashi
shift_evolve
PRO
3
330
Function calling機能をPLaMo2に実装するには / PFN LLMセミナー
pfn
PRO
0
920
組織観点からIAM Identity CenterとIAMの設計を考える
nrinetcom
PRO
1
180
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
75
5k
Practical Orchestrator
shlominoach
190
11k
BBQ
matthewcrist
89
9.8k
The World Runs on Bad Software
bkeepers
PRO
71
11k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
610
Visualization
eitanlees
148
16k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
9
580
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
2.6k
Embracing the Ebb and Flow
colly
88
4.8k
Scaling GitHub
holman
463
140k
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