# 我们可以用 \`.gjs\` 作为路由模板吗？

**URL:** <https://meta.discourse.org/t/can-we-use-gjs-for-route-templates/357046>\
**Category:** Development\
**Created:** [2025年三月12日 23:39 UTC](https://meta.discourse.org/t/can-we-use-gjs-for-route-templates/357046 "2025-03-12T23:39:40Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![bitmage](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bitmage/32/389881_2.png) [@bitmage](https://meta.discourse.org/u/bitmage)\
**Post date:** [2025年三月15日 00:07 UTC](https://meta.discourse.org/t/can-we-use-gjs-for-route-templates/357046/11 "2025-03-15T00:07:03Z")

</div>

我在 `d/rails s` 日志中发现：`No such file or directory @ rb_sysopen - /src/app/assets/stylesheets/plugin-cf.scss`。

因此，尽管插件已作为 `county-fence` 符号链接到 `/plugins` 文件夹，并且我的插件在 `plugins.rb` 中明确命名为 `county-fence`，但某些代码正在读取基础目录名 `plugin-cf` 并假定我的插件的编译后的 CSS 名称是什么。

这是一个错误还是一个功能？ 😃

我认为这个故事的寓意是_在任何情况下都不要将插件目录命名为与插件名称不匹配的任何名称。_ 正确命名的符号链接_不足以_解决问题。

编辑：另外 `register_asset \"stylesheets/common/index.scss\", plugin: \"county-fence\"` 是一个强制正确设置插件名称的解决方法。

---

_[View the full topic](https://meta.discourse.org/t/can-we-use-gjs-for-route-templates/357046)._
