ruby-on-rails - 无法进入 Heroku Rails 控制台
问题描述
我目前正在开发一个 ruby-on-rails 应用程序。我的 Heroku 和 rails 已更新到最新版本,我的应用程序在 Heroku 上功能齐全。我目前使用的 API 是 Bootstrap、Carrierwave、AWS S3 和 Stripe。
每次我运行Heroku run rails console
我都会收到此错误:
31: from /app/bin/rails:9:in `<main>'
30: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
29: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
28: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
27: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
26: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
25: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4/lib/rails/commands.rb:18:in `<top (required)>'
24: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4/lib/rails/command.rb:46:in `invoke'
23: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4/lib/rails/command/base.rb:69:in `perform'
22: from /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
21: from /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
20: from /app/vendor/bundle/ruby/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
19: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4/lib/rails/commands/console/console_command.rb:95:in `perform'
18: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4/lib/rails/command/actions.rb:14:in `require_application_and_environment!'
17: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4/lib/rails/command/actions.rb:22:in `require_application!'
16: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
15: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
14: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
13: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
12: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
11: from /app/config/application.rb:2:in `<top (required)>'
10: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
9: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
8: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
7: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
6: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
5: from /app/vendor/bundle/ruby/2.5.0/gems/carrierwave-2.0.2/lib/carrierwave.rb:59:in `<top (required)>'
4: from /app/vendor/bundle/ruby/2.5.0/gems/carrierwave-2.0.2/lib/carrierwave.rb:60:in `<module:CarrierWave>'
3: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in `load_missing_constant'
2: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:79:in `rescue in load_missing_constant'
1: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `without_bootsnap_cache'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:79:in `block in load_missing_constant': uninitialized constant Rails::Railtie (NameError)
解决方案
推荐阅读
- opengl - libGDX 的 OpenGL 弃用计划
- swift - 如何设置单选按钮不透明/透明的背景?
- assembly - 动态分配数组,高级语言到汇编 MIPS
- regex - 正则表达式从一个字符开始获取两个字符之间的所有内容
- python - 为什么从同一目录中的模块导入模块时必须在模块前加一个点?
- php - 我希望在修改后的 php-mailer 中插入回复按钮
- python - 小写字母出现错误
- java - 如何在对象类的静态方法中使用 return 语句?
- facebook - 该站点如何仍在使用 Facebook 事件 API?
- firebase - Firebase 身份验证身份未在安全 Firestore 规则级别更新