我已经为项目更新了我的红宝石版本,现在出现以下错误。我正在使用devise令牌身份验证进行身份验证,我的会话创建工作正常,并且代码仍在旧版本的ruby上运行,我需要做些什么才能使其在ruby 2.4.4下运行。
/home/dev/.rvm/gems/ruby-2.4.4@opa/gems/fog-xenserver-0.2.3/lib/fog/utilities.rb:4: warning: constant ::Fixnum is deprecated
ArgumentError (key must be 32 bytes):
activesupport (5.0.0) lib/active_support/message_encryptor.rb:72:in `key='
activesupport (5.0.0) lib/active_support/message_encryptor.rb:72:in `_encrypt'
activesupport (5.0.0) lib/active_support/message_encryptor.rb:58:in `encrypt_and_sign'
actionpack (5.0.0) lib/action_dispatch/middleware/cookies.rb:592:in `commit'
actionpack (5.0.0) lib/action_dispatch/middleware/cookies.rb:465:in `[]='
actionpack (5.0.0) lib/action_dispatch/middleware/session/cookie_store.rb:117:in `set_cookie'
rack (2.0.1) lib/rack/session/abstract/id.rb:353:in `commit_session'
rack (2.0.1) lib/rack/session/abstract/id.rb:224:in `context'
rack (2.0.1) lib/rack/session/abstract/id.rb:216:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/cookies.rb:613:in `call'
activerecord (5.0.0) lib/active_record/migration.rb:552:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
activesupport (5.0.0) lib/active_support/callbacks.rb:97:in `__run_callbacks__'
activesupport (5.0.0) lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
activesupport (5.0.0) lib/active_support/callbacks.rb:90:in `run_callbacks'
actionpack (5.0.0) lib/action_dispatch/middleware/callbacks.rb:36:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
better_errors (2.1.1) lib/better_errors/middleware.rb:59:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.0.0) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.0.0) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.0.0) lib/active_support/tagged_logging.rb:70:in `block in tagged'
activesupport (5.0.0) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.0.0) lib/active_support/tagged_logging.rb:70:in `tagged'
railties (5.0.0) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call'
request_store (1.3.2) lib/request_store/middleware.rb:9:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/request_id.rb:24:in `call'
rack (2.0.1) lib/rack/method_override.rb:22:in `call'
rack (2.0.1) lib/rack/runtime.rb:22:in `call`
答案 0 :(得分:2)
将Rails更新为5.0.1
。
我还建议您将fog-xenserver
的gem更新为1.0.0
:
宝石文件
gem 'fog-xenserver', '1.0.0'
在外壳中:
bundle update fog-xenserver
答案 1 :(得分:1)
您已将fog-xenserver升级到最新版本,因为此问题已得到解决。参见拉取请求Fixnum is deprecated
gem 'fog-xenserver', '1.0.0'
和
bundle update fog-xenserver