Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Upgrading Rails Redux
Search
Nathan Youngman
January 19, 2016
Technology
120
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Upgrading Rails Redux
A refresh of my talk on upgrading Rails.
Nathan Youngman
January 19, 2016
Transcript
18 slides
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
More Decks by Nathan Youngman
See All by Nathan Youngman
The Healthy Programmer
nathany
2
130
Go and Node.js: a comparison
nathany
1
290
Diet Hacks
nathany
2
420
Go 1.6 and HTTP/2
nathany
3
180
GopherCon recap
nathany
0
220
Go Functions
nathany
0
130
Go Arrays & Slices
nathany
0
200
Go Types
nathany
2
160
Go Packages
nathany
2
590
Other Decks in Technology
See All in Technology
「正しいデータ」の定義をAI エージェントとつくるGoogleADKによるデータ品質定義の実践
takaha4k
0
140
SBOM 生成ツールで 2026 Minimum Elements はどこまで満たせるのか
gokken
0
160
プラガブルで宣言的なソフトウェアファクトリーを支えるTypeScript
timakin
2
660
さようならSSH鍵、こんにちはゼロトラスト ― AIフレンドリーで快適な自宅鯖SSH
atalie2m
14
7.5k
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
140
現地速報! Microsoft Ignite アップデートレポート
kasada
1
460
落とし穴にハマってわかった 開発生産性を測るときに気をつけたいこと
munakata
3
490
目を覚ませ!僕らの認証情報が何者かに侵略されてるぞ
tkito
2
490
人の努力に頼らないセキュリティをエンジニアリングする在り方 / An approach to engineering security that does not rely on human effort
carta_engineering
0
240
【Oracle AI SPOTLIGHT ウェビナー】AI時代、狙われるデータと止められない業務をどう守るか?
oracle4engineer
PRO
1
140
Amazon Bedrock AgentCore の基礎とセキュリティ・ガバナンス
ren8k
0
270
Go でトランザクション、どう書いてますか?
knwoop
1
600
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
25k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
470
ラッコキーワード サービス紹介資料
rakko
5
6M
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Unsuck your backbone
ammeep
672
58k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
570
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Deep Space Network (abreviated)
tonyrice
0
430
Marketing to machines
jonoalderson
1
6k
Facilitating Awesome Meetings
lara
57
7.2k