Ошибка обновления версии ruby: неопределенный метод `yaml_as ' - PullRequest
0 голосов
/ 06 декабря 2018

Я обновил ruby-версию своего приложения rails с 2.2.1 до 2.5.1.Однако, когда я попытался запустить сервер rails, это выдает мне эту ошибку.

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

1 Ответ

0 голосов
/ 06 декабря 2018

Rails не может запуститься, потому что метод yaml_as больше не существует (он был определен встроенной в Ruby lib psych).

Вам нужно обновить версию delayed_job.См. Этот выпуск github .

Просто запустите bundle update delayed_job.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...