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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Nathan Youngman
January 19, 2016
Technology
99
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
240
Diet Hacks
nathany
2
390
Go 1.6 and HTTP/2
nathany
3
150
GopherCon recap
nathany
0
190
Go Functions
nathany
0
110
Go Arrays & Slices
nathany
0
160
Go Types
nathany
2
140
Go Packages
nathany
2
570
Other Decks in Technology
See All in Technology
Babylon.js Japan Activities (2026/4)
limes2018
0
140
JSTQB Expert Levelシラバス「テストマネジメント」日本語版のご紹介
ymty
0
110
Databricks Lakehouse Federationで 運用負荷ゼロのデータ連携
nek0128
0
110
出版記念イベントin大阪「書籍紹介&私がよく使うMCPサーバー3選と社内で安全に活用する方法」
kintotechdev
0
140
Embeddings : Symfony AI en pratique
lyrixx
0
440
スクラムを支える内部品質の話
iij_pr
0
170
Tour of Agent Protocols: MCP, A2A, AG-UI, A2UI with ADK
meteatamel
0
190
Sansanの認証基盤を支えるアーキテクチャとその振り返り
sansantech
PRO
1
150
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
qa
0
710
パワポ作るマンをMCP Apps化してみた
iwamot
PRO
0
290
AIにより大幅に強化された AWS Transform Customを触ってみる
0air
0
280
AIエージェント勉強会第3回 エージェンティックAIの時代がやってきた
ymiya55
0
220
Featured
See All Featured
Google's AI Overviews - The New Search
badams
0
950
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
230
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
210
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Building Applications with DynamoDB
mza
96
7k
Into the Great Unknown - MozCon
thekraken
40
2.3k
The Curse of the Amulet
leimatthew05
1
11k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
How to make the Groovebox
asonas
2
2.1k
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