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
94
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
110
Go and Node.js: a comparison
nathany
1
220
Diet Hacks
nathany
2
370
Go 1.6 and HTTP/2
nathany
3
140
GopherCon recap
nathany
0
180
Go Functions
nathany
0
100
Go Arrays & Slices
nathany
0
150
Go Types
nathany
2
130
Go Packages
nathany
2
550
Other Decks in Technology
See All in Technology
激動の時代を爆速リチーミングで乗り越えろ
sansantech
PRO
1
250
ピープルウエア x スタートアップ
operando
1
3.3k
AI連携の新常識! 話題のMCPをはじめて学ぶ!
makoakiba
0
180
初海外がre:Inventだった人間の感じたこと
tommy0124
1
190
ゼロコード計装導入後のカスタム計装でさらに可観測性を高めよう
sansantech
PRO
1
700
InsightX 会社説明資料/ Company deck
insightx
0
200
進化する大規模言語モデル評価: Swallowプロジェクトにおける実践と知見
chokkan
PRO
3
460
AIエージェントを導入する [ 社内ナレッジ活用編 ] / Implement AI agents
glidenote
1
200
DMMの検索システムをSolrからElasticCloudに移行した話
hmaa_ryo
0
360
戦えるAIエージェントの作り方
iwiwi
22
11k
アノテーション作業書作成のGood Practice
cierpa0905
PRO
1
400
SOTA競争から人間を超える画像認識へ
shinya7y
0
690
Featured
See All Featured
Writing Fast Ruby
sferik
630
62k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
650
Art, The Web, and Tiny UX
lynnandtonic
303
21k
4 Signs Your Business is Dying
shpigford
186
22k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
How to train your dragon (web standard)
notwaldorf
97
6.3k
The Invisible Side of Design
smashingmag
302
51k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Bash Introduction
62gerente
615
210k
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