Set the ruby version in .ruby-version
to 2.3.5, then perform these steps one by one, fixing errors as they occur:
--backtrace
option--debug
option)rails console staging
Replace ruby-debug
with byebug
or pry
Replace mysql
with mysql2, '< 0.3'
Remove oniguruma
Remove net-ssh
and net-scp
Remove fastercsv
Remove cucumber_spinner
Remove rspec_spinner
Update rspec
to '< 2'
Lock haml
to '= 3.1.7'
Unlock andand
Unlock rake
Lock test-unit
to '= 1.2.3'
Lock database_cleaner
to '< 1.3'
Lock cucumber
to '< 2'
Lock launchy
to '~> 2.1 '
Lock paperclip
to '< 2.8'
Add capybara-screenshot
and require it in Cucumber features. It will simplify debugging failing features.
require 'capybara-screenshot/cucumber'
Capybara::Screenshot.prune_strategy = { keep: 12 } # parallel_tests
TODO: Add rspec-patches
gem from PH
define_method
.require
statements in features/support/env.rb. Use more require_relative
or require Rails.root.join('...')
BigDecimal('12.3')
' '
for nbsp
helper instead of 0xC2.chr + 0xA0.chr
/s
regex modifier (your files are UTF8 anywayrequire 'rake/rdoctask'
with require 'rdoc/task'
Error: wrong number of arguments (given 1, expected 0)
: Use proc
s instead of lambda
s where they are called with variable arguments. Look for named_scopes
.
Error: Attempt to call private method, NoMethodError
: Fix tests by replacing thing.private_method
with thing.send :private_method
will_paginate errors
: If you get pagination errors, make sure a collection isn't silently replaced after pagination:
# does not work
@contracts = @contracts.reject {...}
# works
@contracts.reject! {...}
Change
# old
date:
order: [ :day, :month, :year ]
# new
date:
order:
- :year
- :month
- :day
Also see Upgrade from Ruby 1.8.7 to 2.1.5 – an incomplete guide.