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
78
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
90
Go and Node.js: a comparison
nathany
1
150
Diet Hacks
nathany
2
330
Go 1.6 and HTTP/2
nathany
3
91
GopherCon recap
nathany
0
130
Go Functions
nathany
0
73
Go Arrays & Slices
nathany
0
99
Go Types
nathany
2
110
Go Packages
nathany
2
400
Other Decks in Technology
See All in Technology
XRミーティング 2024-03-20
1ftseabass
PRO
0
100
やっていきテスト
k6s4i53rx
0
160
エバンジェリスト活動を7年やってきて見えてきた、コミュニティとエバンジェリストの関係
soracom
PRO
1
200
KubeCon EU 2024 : Knative Maintainers Session
salaboy
0
380
暗黙知を集積するプラットフォーム : 「健常者エミュレータ事例集」の取り組み
sora32127
1
170
初心者が行く!サーバレスWebアプリ開発の道
nagaharutogawa
0
460
こんなに簡単!AWSマルチアカウント
takuya_terada
0
120
エンジニア候補者向け資料2024.03.28.pdf
macloud
0
2.9k
Castor - Symfony Live 2024 - Paris
lyrixx
1
120
Oracle Database で機械学習を始めよう! Oracle Machine Learning
oracle4engineer
PRO
1
140
実務への応用例から考える 変更に強いオブジェクト指向設計 / 20240324-ooc2024
bengo4com
9
5.7k
オーティファイ会社紹介資料 / Autify Company Deck
autifyhq
7
100k
Featured
See All Featured
Docker and Python
trallard
33
2.6k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
101
6.6k
Optimizing for Happiness
mojombo
369
69k
Learning to Love Humans: Emotional Interface Design
aarron
266
39k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
226
16k
Building a Scalable Design System with Sketch
lauravandoore
455
32k
In The Pink: A Labor of Love
frogandcode
137
21k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
219
21k
The MySQL Ecosystem @ GitHub 2015
samlambert
242
12k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
657
120k
Facilitating Awesome Meetings
lara
39
5.5k
The Pragmatic Product Professional
lauravandoore
24
5.7k
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