我是Heroku的新手,我一直跟随着入门指南的脚步。但是,当我使用git push heroku master
部署应用程序时,它将开始构建应用程序,并在尝试使用以下错误预编译资产之后停止:
remote: Running: rake assets:precompile
remote: rake aborted!
remote: LoadError: Could not load the 'listen' gem. Add `gem 'listen'` to the development group of your Gemfile
remote: /tmp/build_78073b13aac28e116288169779278ade/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `require'
我已经验证了gem实际上在我的Gemfile中的开发组中,并且尝试将gem 'listen'
移出开发范围关于有关问题的答复,但是问题仍然存在。
发布于 2018-01-09 00:40:47
要解决此问题,您可以:
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
中的行config/environments/development.rb
或heroku config:set RAILS_ENV=production
或config/environments/production.rb
复制到新文件config/environments/staging.rb
中,并在heroku配置变量中设置RAILS_ENV=staging
。就我个人而言,我更喜欢后者。
祝好运
https://stackoverflow.com/questions/44145293
复制相似问题