【问题标题】:Ruby - Webpacker can't find application inRuby - Webpacker 找不到应用程序
【发布时间】:2021-02-06 11:30:57
【问题描述】:

安装设备 gem 后,我遇到了错误。我该如何解决这个问题:

Webpacker can't find application in /home/grkmdgn06/Desktop/my5_homework/public/packs/manifest.json. Possible causes:
1. You want to set webpacker.yml value of compile to true for your environment
   unless you are using the `webpack -w` or the webpack-dev-server.
2. webpack has not yet re-run to reflect updates.
3. You have misconfigured Webpacker's config/webpacker.yml file.
4. Your webpack configuration is not creating a manifest.
Your manifest contains:
{
}

提取的源代码(第 9 行附近): ...

<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %> # error line
...

【问题讨论】:

    标签: ruby-on-rails ruby webpack rubygems


    【解决方案1】:

    也许你的 node.js 已经过时了

    试试这个:

    sudo npm install n -g
    
    sudo n stable
    
    bundle exec rake webpacker:install
    

    【讨论】:

      猜你喜欢
      • 2020-02-04
      • 2020-06-26
      • 2020-04-26
      • 2019-06-13
      • 1970-01-01
      • 2020-04-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多