jinhucheung / intro

Intro brings your rails application to new feature introduction and step-by-step users guide.

Home Page:https://github.com/jinhucheung/intro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

使用rails6,ruby版本是2.7.1,出现错误

clousky2020 opened this issue · comments

按照说明添加 intro_tags 在共用的views/layouts/application.html.erb 中, 在 body 标签关闭之前:

<%= intro_tags %>
</body>
</html>

打开http://localhost:3000/出现错误,说明上没有看到相关的问题解决方法。

ActionView::Template::Error (intro/application.js):
    21: </div>
    22: 
    23: <%= render "layouts/footer" %>
    24: <%= intro_tags %>
    25: </body>
    26: </html>

app/views/layouts/application.html.erb:24

在进入http://localhost:3000/intro/admin后,跳转到http://localhost:3000/intro/admin/sessions/new

Sprockets::Rails::Helper::AssetNotPrecompiled in Intro::Admin::Sessions#new
Showing /Users/mac/.rvm/gems/ruby-2.7.1/gems/intro-0.3.0/app/views/layouts/intro/admin/application.html.erb where line #6 raised:

intro/admin/application.css

          def raise_unless_precompiled_asset(path)
            raise Helper::AssetNotPrecompiled.new(path) if @check_precompiled_asset && !precompiled?(path)
          end
      end
    end

是我哪里还没有做好吗?

commented

@clousky2020 感谢反馈,我没有在 rails 6 上测试过 intro

目前 intro 需要使用 sprockets 进行编译,而 rails 6 默认使用 webpacker, 暂时怀疑是此问题引起

commented

hi @clousky2020,

Intro 已经升级到 0.4.0 版本, 目前已支持 Rails 6,使用 Webpacker 来编译资源。

intro-demo 也已更新到 0.4.0。

Happy New Year! 🎉