我正在使用Rails6成功地将代码部署到heroku,但是public/packs deploy.it没有负责post表单页面中的add tag选项。
Application.js
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
import "bootstrap"
require("@rails/ujs").start()
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")
require('./nested-forms/addFields')
// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)发布于 2021-04-28 14:37:33
我修复了它,删除了.gitignore中的public\packs文件
https://stackoverflow.com/questions/67263637
复制相似问题