问题标签 [rails-upgrade]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ruby-on-rails - 弃用 Rails 5 的 Factory_girl
我目前正在将我的 rails 应用程序从 rails 4 升级到 rails 5。是否有必要从 Factory_girl 更改为 Factory_bot?如果我继续发出弃用警告会怎样?此外,我可能会将该应用程序升级到 rails 6,那么 factory_girl 是否适用于 rails 6?
amazon-elb - 从 Rails 5 升级到 Rails 6 后,ELB 目标组运行状况检查失败并出现 403
在将 rails 升级到rails 6后,ELB 目标组的运行状况检查失败,状态码为403禁止。然而,健康检查正在开发中,但不在 AWS 云上。
rails 5的健康检查成功,但rails 6的健康检查失败。
任何帮助将不胜感激。
ruby-on-rails - Rails 升级 nil 的未定义方法“每个”后的活动记录错误:NilClass 和未定义方法“包含?” 对于零:NilClass
我逐步将 rails 4.2.10 升级到 6.0。但是,当我尝试将 rails 5.2.4.4 升级到 6.0 时,我无法查询,因为Object.all
它为 nil:NilClass错误提供了未定义的方法“每个” 。当我尝试调用Object
它时,它给了我未定义的方法“包括?” 对于 nil:NilClass。即使我无法运行它在运行后创建的活动存储的迁移文件,rails active_storage:update
我也不明白出了什么问题,我也没有看到任何人生活在同样的事情上。
这个是请求错误和没有迁移的代码
这是一个带有回溯的迁移错误。
ruby-on-rails - Rails 5 和每 30 秒的神秘请求
升级到 Rails 5 后,我注意到每 30 秒就会有一个对我们根 url 的请求进入。
有谁知道这可能是什么?
我检查了一些事情,例如关闭所有浏览器、重新启动服务器、查看我们的 javascript 会话超时检查以及检查没有 rake 任务正在运行。
很可能这是我们的代码特有的东西,没有人能提供帮助,但希望如此!(当我们使用 Rails 4.2 时没有发生)
ruby-on-rails - 升级到 Rails 6 的依赖错误
我删除了我的 Gemfile.lock,将我的更改gem 'rails', '5.2'
为gem 'rails', '6.0'
并进行捆绑安装。
我得到很多依赖错误。但我无法理解它们,因为它们看起来还不错。
我收到这样的错误:
还有更多.. 在上面似乎依赖关系应该没问题,即 pry-doc 的 0.11 大于所有其他的,并且它们都指定大于或等于。
ruby-on-rails - Rails 升级 4.2 -> 5 - Bundler 无法解析确切的 gem 版本
当我试图从 4.2.11.1 迁移到 5.0.1 时,我在升级各种 gem 时遇到了这个错误。动作包的示例错误:
就我对 gem 版本的理解而言,这不应该是一个错误,因为 5.0.1 版本满足所有依赖项。有人可以解释我怎样才能摆脱这些错误吗?我在升级时遇到了很多这样的错误
ruby-on-rails - Rails 6 ActionView::MissingTemplate 缺少模板错误/500
调用时出现错误render json
:
代码:
view_context.asset_for_mustache
返回对象值并正常工作的函数在哪里。
我正在使用相关的 gem 升级现有项目并将版本从 ruby 2.3.1 升级到 3.0.1 (rails 6.1.4)。
任何建议,如何解决这个问题?或者我需要在哪里检查?
ruby - 耙中止!NoMethodError:ActiveRecord::SchemaDumper:Class 的未定义方法“alias_method_chain”
当我在 gemfile 中添加外国人 gem 时,我正在将 rails 4.1 升级到 6.1:任何解决方案都可以快速发布,否则您可以邮寄到 santu.essence@gmail.com
/usr/local/bundle/bundler/gems/foreigner-0496762a6c0a/lib/foreigner/schema_dumper.rb:6:in block in <module:SchemaDumper>' /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/concern.rb:136:in
class_eval' /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/concern.rb :136:in append_features' /usr/local/bundle/bundler/gems/foreigner-0496762a6c0a/lib/foreigner/loader.rb:9:in
include '/usr/local/bundle/bundler/gems/foreigner-0496762a6c0a/lib/foreigner/loader.rb:9:in block in load' /usr/local/bundle/bundler/gems/foreigner-0496762a6c0a/lib/foreigner/loader.rb:8:in
class_eval'/usr/local/bundle/bundler/gems/foreigner-0496762a6c0a/lib /foreigner/loader.rb:8:in load' /usr/local/bundle/bundler/gems/foreigner-0496762a6c0a/lib/foreigner/railtie.rb:5:in
block (2 levels) in class:Railtie' /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:71:in class_eval' /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:71:in
block in execute_hook' /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:61:in with_execution_control' /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:66:in
execute_hook' /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb :52:在block in run_load_hooks' /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:51:in
每个' /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:51:in run_load_hooks' /usr/local/bundle/gems/activerecord-6.1.4.1/lib/active_record/base.rb:315:in
module:ActiveRecord' /usr/local/bundle/gems/activerecord-6.1.4.1/lib/active_record /base.rb:15:in<top (required)>' worker_1 | /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in
需要'worker_1 | /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:inrequire' worker_1 | /usr/local/bundle/gems/activerecord-6.1.4.1/lib/active_record/railtie.rb:132:in
类中的块(3 级):Railtie'worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:71:in class_eval' worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:71:in
block in execute_hook' worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:61:in with_execution_control' worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:66:in
execute_hook'worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:43 :在block in on_load' worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:42:in
每个'worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:42:on_load' worker_1 | /usr/local/bundle/gems/activerecord-6.1.4.1/lib/active_record/railtie.rb:131:in
类中的块(2 级):Railtie'worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:68:in block in execute_hook' worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:61:in
with_execution_control' worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:66:in execute_hook' worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:52:in
block in run_load_hooks' worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:51:in each' worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:51:in
run_load_hooks'worker_1 | /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/application/finisher.rb:140:in block in <module:Finisher>' worker_1 | /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in
instance_exec' worker_1 | /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:inrun' worker_1 | /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/initializable.rb:61:in
块在 run_initializers'worker_1 | /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/initializable.rb:60:inrun_initializers' worker_1 | /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/application.rb:391:in
初始化!' worker_1 | /usr/src/app/config/environment.rb:4:in<top (required)>' worker_1 | /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in
需要'worker_1 | /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in require' worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in
block in require'worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:inload_dependency' worker_1 | /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in
需要'worker_1 | /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/application.rb:367:in require_environment!' worker_1 | /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/application.rb:533:in
block in run_tasks_blocks'worker_1 | /usr/local/bundle/gems/rake-13.0.6/exe/rake:27:in `<top (required)>' worker_1 | 任务:TOP => resque:work => resque:preload => resque:setup => environment worker_1 | (通过使用 --trace 运行任务查看完整跟踪)
ruby-on-rails - SystemStackError:从 rails 6.0 升级到 6.1.4 时堆栈级别太深
当我使用 ruby 2.7.4 升级我的 rails 应用程序并将 form rails 6.0 移动到 6.1.4 时,我在运行命令时遇到了问题
我还添加了几行错误