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
100
1
Share
Upgrading Rails Redux
A refresh of my talk on upgrading Rails.
Nathan Youngman
January 19, 2016
More Decks by Nathan Youngman
See All by Nathan Youngman
The Healthy Programmer
nathany
2
120
Go and Node.js: a comparison
nathany
1
250
Diet Hacks
nathany
2
400
Go 1.6 and HTTP/2
nathany
3
160
GopherCon recap
nathany
0
200
Go Functions
nathany
0
110
Go Arrays & Slices
nathany
0
170
Go Types
nathany
2
140
Go Packages
nathany
2
570
Other Decks in Technology
See All in Technology
AI Engineering Summit Tokyo 2026 AIの前に、やることがある 〜医療データ企業の4フェーズ〜
dtaniwaki
0
1.4k
MIERUNE JCT 発表資料「宇宙から伊能忠敬ごっこ」
syuchimu
0
140
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.8k
Javaコミュニティをもっと楽しむための9箇条
takasyou
0
1.2k
JJUG CCC 2026 Spring AI時代の開発こそ標準化を武器に! ― 方式・プロセス・プラットフォームの標準化
s27watanabe
2
690
製造業のクラウド活用最適解〜AI,DXを加速するデータ基盤の作り方〜
hamadakoji
0
320
トークン数だけでは測れない — Claude Code 組織展開の効果検証から学んだこと
makikub
0
120
GoとSIMDとWasmの今。
askua
3
490
新規ゲーム開発におけるAI駆動開発のリアル
202409e2
0
2.1k
APIテストとは?
nagix
0
170
Claude code Orchestra
ozakiomumkj
3
920
イベントストーミングとKiroの仕様駆動開発で実現する要件の認識合わせプロセス
syobochim
7
1.1k
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Building an army of robots
kneath
306
46k
The Spectacular Lies of Maps
axbom
PRO
1
790
A Modern Web Designer's Workflow
chriscoyier
698
190k
sira's awesome portfolio website redesign presentation
elsirapls
0
270
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
Context Engineering - Making Every Token Count
addyosmani
9
930
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
190
How STYLIGHT went responsive
nonsquared
100
6.2k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
180
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