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
A few slides about the migration from Rails 4 t...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Adam Nowak
July 06, 2016
Programming
270
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
A few slides about the migration from Rails 4 to Rails 5
based on github.com/netguru/reminders app
Adam Nowak
July 06, 2016
More Decks by Adam Nowak
See All by Adam Nowak
20x more people around. Highlights and challenges of the fast growing team.
lubieniebieski
1
140
Daily Development Tips
lubieniebieski
0
150
Stick to the rules
lubieniebieski
4
530
Other Decks in Programming
See All in Programming
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
150
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
300
AmebaブログはKMPから卒業します
kmars0605
0
340
Modernizing iOS Apps
seyfoyun
0
150
Будущее локальных LLM – Алексей Голобурдин, PythoNN
sobolevn
0
120
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
240
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
640
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
220
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
130
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.8k
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.3k
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
SEO for Brand Visibility & Recognition
aleyda
0
4.9k
Designing Experiences People Love
moore
143
24k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
520
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
600
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
350
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
470
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Six Lessons from altMBA
skipperchong
29
4.6k
Transcript
Rails 5 is here a few slides about the migration
from Rails ~4
None
my slides are not about the features - you have
to check them out on your own!
I need a TODO app for test
but let’s upgrade something more useful
None
https://github.com/ netguru/reminders
Gemfile gem "rails", "~> 4" gem "coffee-rails" gem "bootstrap-datepicker-rails" gem
"decent_exposure" gem "draper" gem "jquery-rails", "4.0.4" # version 4.0.5 breaks jquery-datatables
UPDATING!
Step 1 - changing relevant gems gem "rails", "~> 4”
Step 1 - changing relevant gems gem "rails", "~> 4”
gem "rails", "~> 5"
Step 1 - changing relevant gems bundle update rails
None
None
Step 2 - updating gems along the way bundle update
rails railties
meh!
Step 2 - updating gems along the way bundle update
rails railties sass-rails
nope!
Step 2 - updating gems along the way bundle update
rails railties sass-rails coffee-rails slim-rails
still missing something!
Step 3 - strict dependencies gem "jquery-rails", "4.0.4" # version
4.0.5 breaks jquery-datatables
Step 3 - strict dependencies gem "jquery-rails", "4.0.4" # version
4.0.5 breaks jquery-datatables gem "jquery-rails"
Step 3 - strict dependencies gem "sass-rails", "~> 5.0"
gem "sass-rails"
Step 3 - strict dependencies bundle update rails railties sass-rails
coffee-rails slim-rails jquery-rails
None
better, but still
let’s have a look again
None
https://github.com/ evrone/quiet_assets/pull/ 51
so we don’t need it anymore
Step 1 - changing relevant gems gem "quiet_assets"
Step 1 - changing relevant gems gem "quiet_assets" gem "quiet_assets"
Step 2 - updating gems along the way bundle update
rails railties coffee- rails slim-rails
pretty good, we need to solve rspec-rails
Step 2 - updating gems along the way bundle update
rails railties coffee- rails slim-rails rspec-rails
None
hahahha, you fool
zoom in
None
there should be puma here, right?
Step 1 - changing relevant gems gem "thin" gem "thin"
Step 2 - updating gems along the way bundle update
rails railties coffee- rails slim-rails rspec-rails
yeah
step 1&2 done - our Gemfile is ok
Step 3 - draper /Users/adamo/.rbenv/versions/2.2.3/lib/ ruby/gems/2.2.0/gems/draper-2.1.0/lib/ draper.rb:5:in `require': cannot load
such file -- active_model/serializers/ xml (LoadError)
It turns out, draper gem isn’t quite ready for Rails
5
It turns out, draper gem isn’t quite ready for Rails
5
I’ve used drape gem instead but you should follow https://github.com/drapergem/
draper/pull/752
Step 3 - draper gem "draper" gem "draper"
Step 3 - draper bundle
drape is pretty much the same as draper but you
have to change the namespace
let’s create base decorator (it should have been here before)
Step 3 - draper class BaseDecorator < Drape::Decorator; end class
ProjectDecorator < BaseDecorator
awesome!
Step 4 - rollbar bundle update rollbar # 2.8.0 wasn’t
good enough
push it!
None
webrick? it’s so <=Rails4
None
Step 4 - puma gem „puma" bundle
None
success!
Step 4 - rails:update bin/rake rails:update
keep going
Step 4 - rspec bundle update rspec-core
it turns out, you have to be strict this time
Step 4 - rspec gem "rspec-rails", "~> 3.5" bundle
yep!
Step 5 - decent_exposure /Users/adamo/code/reminders/app/ controllers/application_controller.rb: 2:in `<class:ApplicationController>': undefined method
`decent_configuration' for ApplicationController:Clas
well, read the wiki https://github.com/hashrocket/ decent_exposure/wiki/Api-changes-in- version-3#undefined-method- decent_configuration
Step 5 - decent_exposure decent_configuration do strategy DecentExposure::StrongParametersStrategy end
Step 6 - rails-controller- testing 245 examples, 3 failures NoMethodError:
assert_template has been extracted to a gem. To continue using it, add `gem 'rails-controller-testing'` to your Gemfile.
Step 6 - rails-controller- testing gem „rails-controller-testing" bundle
YES
Step 6 - rack-mini-profiler bundle update rack-mini-profiler
QL
it works:)
https://github.com/ netguru/reminders/pull/35
–no one ever “migration will be easy”
–me, now “but please do it”
t.hanks! adam nowak / @lubieniebieski 06/07/2016