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
Lambda Durable FunctionsでStep Functionsの代わりはできるのかを試してみた
smt7174
2
150
Tebiki Engineering Team Deck
tebiki
0
23k
Claude Codeベストプラクティスまとめ
minorun365
50
27k
ビジュアルプログラミングIoTLT vol.22
1ftseabass
PRO
0
140
【インシデント入門】サイバー攻撃を受けた現場って何してるの?
shumei_ito
0
530
最速で価値を出すための プロダクトエンジニアのツッコミ術
kaacun
1
290
習慣とAIと環境 — 技術探求を続ける3つの鍵
azukiazusa1
3
790
BPaaSオペレーション・kubell社内 n8n活用による効率化検証事例紹介
kubell_hr
0
320
オープンウェイトのLLMリランカーを契約書で評価する / searchtechjp
sansan_randd
0
190
GitHub Copilot CLI 現状確認会議
torumakabe
12
4.9k
「全社導入」は結果。1人の熱狂が組織に伝播したmikanのn8n活用
sota_mikami
0
540
「AIでできますか?」から「Agentを作ってみました」へ ~「理論上わかる」と「やってみる」の隔たりを埋める方法
applism118
8
5.9k
Featured
See All Featured
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
82
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Why Our Code Smells
bkeepers
PRO
340
58k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
130
Marketing to machines
jonoalderson
1
4.6k
Embracing the Ebb and Flow
colly
88
5k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
280
Mind Mapping
helmedeiros
PRO
0
55
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
48
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