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
120
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
110
Go Arrays & Slices
nathany
0
160
Go Types
nathany
2
140
Go Packages
nathany
2
560
Other Decks in Technology
See All in Technology
生成AIの利用とセキュリティ /gen-ai-and-security
mizutani
1
1.6k
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
5
1.1k
JAWS DAYS 2026 ExaWizards_20260307
exawizards
0
410
Security Diaries of an Open Source IAM
ahus1
0
210
AWS DevOps Agent vs SRE俺 / AWS DevOps Agent vs me, the SRE
sms_tech
3
530
S3はフラットである –AWS公式SDKにも存在した、 署名付きURLにおけるパストラバーサル脆弱性– / JAWS DAYS 2026
flatt_security
0
1.7k
技術的負債の泥沼から組織を救う3つの転換点
nwiizo
8
3.5k
PMBOK第8版は第7版から何が変わったのか(PMBOK第8版概要解説) / 20260304 Takeshi Watarai
shift_evolve
PRO
0
200
楽しく学ぼう!コミュニティ入門 AWSと人が つむいできたストーリー
hiroramos4
PRO
1
190
Datadog の RBAC のすべて
nulabinc
PRO
3
440
Abuse report だけじゃない。AWS から緊急連絡が来る状況とは?昨今の攻撃や被害の事例の紹介と備えておきたい考え方について
kazzpapa3
1
430
開発組織の課題解決を加速するための権限委譲 -する側、される側としての向き合い方-
daitasu
5
570
Featured
See All Featured
How to make the Groovebox
asonas
2
2k
Building Adaptive Systems
keathley
44
2.9k
Writing Fast Ruby
sferik
630
63k
4 Signs Your Business is Dying
shpigford
187
22k
Mind Mapping
helmedeiros
PRO
1
110
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
100
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
The Curse of the Amulet
leimatthew05
1
9.8k
Optimizing for Happiness
mojombo
378
71k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
82
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
68
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