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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
390
Go 1.6 and HTTP/2
nathany
3
160
GopherCon recap
nathany
0
190
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
AgentCore Managed Harness を使ってみよう
yakumo
2
230
国内外の生成AIセキュリティの最新動向 & AIガードレール製品「chakoshi」のご紹介 / Latest Trends in Generative AI Security (Domestic & International) & Introduction to AI Guardrail Product "chakoshi"
nttcom
4
1.4k
AgentCore×VPCでの設計パターンn選と勘所
har1101
3
300
LLM時代の検索アーキテクチャと技術的意思決定
shibuiwilliam
3
1.5k
コードや知識を組み込む / Incorporate Code and Knowledge
ks91
PRO
0
170
Route 53 Global Resolver で高額課金発生!
otanikohei2023
0
120
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
12
4.8k
Do Ruby::Box dream of Modular Monolith?
joker1007
1
350
20260428_Product Management Summit_tadokoroyoshiro
tadokoro_yoshiro
14
14k
Keeping Ruby Running on Cygwin
fd0
0
180
コミュニティ・勉強会を作るのは目的じゃない
ohmori_yusuke
0
260
AI駆動1on1〜AIに自分を育ててもらう〜
yoshiakiyasuda
0
150
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
99
Thoughts on Productivity
jonyablonski
76
5.1k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
110
We Are The Robots
honzajavorek
0
220
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
180
Raft: Consensus for Rubyists
vanstee
141
7.4k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
RailsConf 2023
tenderlove
30
1.4k
Building an army of robots
kneath
306
46k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
210
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
BBQ
matthewcrist
89
10k
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