I upgraded ruby version of my rails app from 2.2.1 to 2.5.1. However when I tried to start the rails server it gives me this error.
constant OpenSSL::SSL::SSLContext::METHODS is deprecated Traceback (most recent call last):
25: from bin/rails:4:in `<main>'
24: from bin/rails:4:in `require'
23: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/railties-4.2.10/lib/rails
/commands.rb:17:in `<top (required)>'
22: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/railties-4.2.10/lib/rails
/commands/commands_tasks.rb:39:in `run_command!'
21: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/railties-4.2.10/lib/rails
/commands/commands_tasks.rb:75:in `server'
20: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/railties-4.2.10/lib/rails
/commands/commands_tasks.rb:75:in `tap'
19: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/railties-4.2.10/lib/rails
/commands/commands_tasks.rb:78:in `block in server'
18: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/railties-4.2.10/lib/rails
/commands/commands_tasks.rb:78:in `require'
17: from /home/jaydee/source/ruby-upgrade/shiftshark/config
/application.rb:6:in `<top (required)>'
16: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/bundler-1.17.1
/lib/bundler.rb:114:in `require'
15: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/bundler-1.17.1/lib/bundler
/runtime.rb:65:in `require'
14: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/bundler-1.17.1/lib/bundler
/runtime.rb:65:in `each'
13: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/bundler-1.17.1/lib/bundler
/runtime.rb:76:in `block in require'
12: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/bundler-1.17.1/lib/bundler
/runtime.rb:76:in `each'
11: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/bundler-1.17.1/lib/bundler
/runtime.rb:81:in `block (2 levels) in require'
10: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/bundler-1.17.1/lib/bundler
/runtime.rb:81:in `require'
9: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/delayed_job_active_record-
4.0.3/lib/delayed_job_active_record.rb:5:in `<top (required)>'
8: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/delayed_job-4.0.6/lib
/delayed/worker.rb:64:in `backend='
7: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.10
/lib/active_support/dependencies.rb:274:in `require'
6: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.10
/lib/active_support/dependencies.rb:240:in `load_dependency'
5: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.10
/lib/active_support/dependencies.rb:274:in `block in require'
4: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/activesupport-4.2.10
/lib/active_support/dependencies.rb:274:in `require'
3: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/delayed_job-4.0.6/lib
/delayed/serialization/active_record.rb:2:in `<top (required)>'
2: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/delayed_job-4.0.6/lib
/delayed/serialization/active_record.rb:3:in `<module:ActiveRecord>'
1: from /home/jaydee/.rvm/gems/ruby-2.5.1/gems/delayed_job-4.0.6/lib
/delayed/serialization/active_record.rb:4:in `<class:Base>'
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/activerecord-4.2.10
/lib/active_record/dynamic_matchers.rb:26:in `method_missing':
undefined method `yaml_as' for ActiveRecord::Base:Class (NoMethodError)
Did you mean? yaml_tag
Rails can't start because the yaml_as
method doesn't exist any more (it was defined by the ruby built-in lib psych
).
You need to update the version of delayed_job
. See this github issue.
Just run bundle update delayed_job
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With