Issues I have found when doing Ruby on Rails upgrades of Ruby version 1.8.7 to 2.2 or 2.1:
- Use new lambda syntax: change
lambda { |x| ... }
to->(x) { ... }
. You can probably fix these with Rubocop’s--auto-correct
. See my rant about Add Rubocop to every Rails project-
Remove gem
parallel_tests
. Spring will take care of most of your rspec slowness going forward. -
Upgrade
sanitize
gem to 4+. -
gem
ruby-debug
should be removed or replaced withbyebug
-
Remove gem
mysql
withmysql2
-
Remove gem
fastercsv
. Migrate to something likeroo
-
Update gem capistrano 2.12.0 to ~>2.12. You should also get rid of dependencies for net-scp and net-ssh if they are in your Gemfile.
-
Upgrade
i18n
gem. Make sure it is latest as there are known problems with below version 0.7.0. -
Remove gem
oniguruma
-
Remove gem
parallel_tests
. Spring will take care of most of your rspec slowness going forward. -
fix incompatible character encodings: UTF-8 and ASCII-8BIT. Use
Encoding.default_external = Encoding::UTF_8
andEncoding.default_internal = Encoding::UTF_8
-
Do a grep in your
app/views
andapp/helpers
for calls the Rails builtin helpertruncate
. The method parameters changed from an integer to a hash:truncate('hello, world', 5)
is nowtruncate('hello, world', length: 5)
-
This list is still a work in progress and includes no warranty.