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
1
99
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
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
Network Firewall Proxyで 自前プロキシを消し去ることができるのか
gusandayo
0
130
AI時代のシステム開発者の仕事_20260328
sengtor
0
310
スケーリングを封じられたEC2を救いたい
senseofunity129
0
120
PostgreSQL 18のNOT ENFORCEDな制約とDEFERRABLEの関係
yahonda
0
150
ハーネスエンジニアリング×AI適応開発
aictokamiya
1
830
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
3
2k
【AWS】CloudTrail LakeとCloudWatch Logs Insightsの使い分け方針
tsurunosd
0
130
AIエージェント勉強会第3回 エージェンティックAIの時代がやってきた
ymiya55
0
170
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
260
やさしいとこから始めるGitHubリポジトリのセキュリティ
tsubakimoto_s
3
2.1k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
夢の無限スパゲッティ製造機 #phperkaigi
o0h
PRO
0
400
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
160
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
WENDY [Excerpt]
tessaabrams
9
37k
Evolving SEO for Evolving Search Engines
ryanjones
0
170
Context Engineering - Making Every Token Count
addyosmani
9
780
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
A designer walks into a library…
pauljervisheath
210
24k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
990
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
A Tale of Four Properties
chriscoyier
163
24k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
330
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
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