主题/组件安装错误

您好,我正在为某个项目开发一个主题组件,并为此创建了一个 GitHub 仓库,但当我尝试在本地开发实例中安装它(或任何其他远程主题/组件)时,我只会收到一个 500 错误。这是我在日志中看到的内容,但我不知道如何进一步调试?

Completed 500 Internal Server Error in 780ms (ActiveRecord: 1.6ms | Allocations: 61496)


Errno::ENOENT (No such file or directory - timeout)
lib/discourse.rb:150:in `execute_command'
lib/discourse.rb:127:in `exec'
lib/discourse.rb:34:in `execute_command'
lib/theme_store/git_importer.rb:121:in `execute'
lib/theme_store/git_importer.rb:54:in `version'
app/models/remote_theme.rb:193:in `update_from_remote'
app/models/remote_theme.rb:93:in `import_theme'
app/controllers/admin/themes_controller.rb:104:in `import'
app/controllers/application_controller.rb:387:in `block in with_resolved_locale'
app/controllers/application_controller.rb:387:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/missing_avatars.rb:23:in `call'
lib/middleware/turbo_dev.rb:34:in `call'
  Rendering /opt/homebrew/lib/ruby/gems/2.7.0/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb
  Rendering /opt/homebrew/lib/ruby/gems/2.7.0/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/templates/rescues/_source.text.erb
  Rendered /opt/homebrew/lib/ruby/gems/2.7.0/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/templates/rescues/_source.text.erb (Duration: 0.4ms | Allocations: 441)
  Rendering /opt/homebrew/lib/ruby/gems/2.7.0/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb
  Rendered /opt/homebrew/lib/ruby/gems/2.7.0/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb (Duration: 0.4ms | Allocations: 286)
  Rendering /opt/homebrew/lib/ruby/gems/2.7.0/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb
  Rendered /opt/homebrew/lib/ruby/gems/2.7.0/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb (Duration: 0.3ms | Allocations: 332)
  Rendered /opt/homebrew/lib/ruby/gems/2.7.0/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb (Duration: 15.6ms | Allocations: 7673)

您是否尝试过使用主题创建器和主题 CLI 开始构建 Discourse 主题的初学者指南。是那样工作的吗?

哎呀!:man_facepalming:t5: 谢谢你,Jay!我已经安装了 Theme CLI,只是忘记了。这样就行了。

1 个赞

那么,你关于主题的部分是对的。

它在公开的代码库里吗?也许你在这方面弄错了。

是的,它在一个公共仓库中,但即使我尝试安装官方主题和组件时也会遇到同样的错误。我很想弄清楚,因为我正在开发两个组件,再加上 Discourse 本身所需的两个组件,这意味着我每次会话需要运行四个终端 :grimacing:

您是否处于某种防火墙或奇怪的网络后面?

不,只是普通的家庭宽带连接和wifi网络,没有特殊的网络配置。

1 个赞