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
88
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
100
Go and Node.js: a comparison
nathany
1
200
Diet Hacks
nathany
2
360
Go 1.6 and HTTP/2
nathany
3
130
GopherCon recap
nathany
0
170
Go Functions
nathany
0
97
Go Arrays & Slices
nathany
0
140
Go Types
nathany
2
130
Go Packages
nathany
2
540
Other Decks in Technology
See All in Technology
Claude Code に プロジェクト管理やらせたみた
unson
8
4.9k
AWS CDK 入門ガイド これだけは知っておきたいヒント集
anank
5
600
モニタリング統一への道のり - 分散モニタリングツール統合のためのオブザーバビリティプロジェクト
niftycorp
PRO
1
360
公開初日に Gemini CLI を試した話や FFmpeg と組み合わせてみた話など / Gemini CLI 初学者勉強会(#AI道場)
you
PRO
0
1k
DatabricksにOLTPデータベース『Lakebase』がやってきた!
inoutk
0
150
事例で学ぶ!B2B SaaSにおけるSREの実践例/SRE for B2B SaaS: A Real-World Case Study
bitkey
1
340
american aa airlines®️ USA Contact Numbers: Complete 2025 Support Guide
aaguide
0
500
敢えて生成AIを使わないマネジメント業務
kzkmaeda
2
510
「Chatwork」のEKS環境を支えるhelmfileを使用したマニフェスト管理術
hanayo04
1
240
セキュアな社内Dify運用と外部連携の両立 ~AIによるAPIリスク評価~
zozotech
PRO
0
100
Operating Operator
shhnjk
1
650
shake-upを科学する
rsakata
7
930
Featured
See All Featured
Statistics for Hackers
jakevdp
799
220k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
54k
Embracing the Ebb and Flow
colly
86
4.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
It's Worth the Effort
3n
185
28k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
For a Future-Friendly Web
brad_frost
179
9.8k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Code Review Best Practice
trishagee
69
19k
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