该应用程序可在Heroku上运行,除了它应该显示带有gon和cytoscape js的图形,但没有。没有错误消息。
HTML中唯一的显着区别是在生产中,所有javascript和样式表文件都是预编译的:
生产:
<link rel="stylesheet" media="all" href="/assets/application-97fedf3d6ebadf9658f179ce8a751e3ed05d1aa3bf6ce6be192e397b824e7f74.css" />
<script src="/assets/application-d5a91369fc9a95afb2281d718e463b03184e0ece461c52b2d8c78e63b5ef16a4.js"></script>
本地:
<link rel="stylesheet" media="all" href="/assets/select2.self-896365bdffeaf8e35a12caad065cc092cfcb4f7a36ad77eb1343fa6f6f40cc66.css?body=1" />
<link rel="stylesheet" media="all" href="/assets/select2-bootstrap.self-7da9a1fdf6150ac9fb6849734104aaba844871ff119da43ea0ceccc930c476af.css?body=1" />
<link rel="stylesheet" media="all" href="/assets/application.self-9d1d421547202855000cc25c86f69148522c38ed15a4de25e485df0c264540b7.css?body=1" />
<link rel="stylesheet" media="all" href="/assets/twitter-bootstrap-static/bootstrap.self-603f330c29af013305325569c8c75d03d688963abd8cde4fffec17b5ce417bfb.css?body=1" />
<link rel="stylesheet" media="all" href="/assets/twitter-bootstrap-static/sprites.self-556e1741ff6d22f63fe0be609679c8f06ffc45eabc31836b6b785475bb283b84.css?body=1" />
<link rel="stylesheet" media="all" href="/assets/bootstrap_and_overrides.self-f5a90d20e5090d64763dcfad94d947343b9898d7a030bb466e9247e00ca06c27.css?body=1" />
<link rel="stylesheet" media="all" href="/assets/medium-editor/medium-editor.self-513b85b7e3f9f288dadfa41bab0c8ba717f1279b13595f2dc77b54bebfe3431f.css?body=1" />
<link rel="stylesheet" media="all" href="/assets/medium-editor/themes/beagle.self-534d90e3c85b8c27175857dd3bab276778312301f1f74dd99e03628ee8c541c2.css?body=1" />
<link rel="stylesheet" media="all" href="/assets/articles.self-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css?body=1" />
<link rel="stylesheet" media="all" href="/assets/relations.self-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css?body=1" />
<link rel="stylesheet" media="all" href="/assets/scaffolds.self-f5864251a4ff9b509f17052c56a2d24456178589b1a90a9f5b55db97cb05b1bc.css?body=1" />
<link rel="stylesheet" media="all" href="/assets/users.self-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css?body=1" />
<script src="/assets/jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js?body=1"></script>
<script src="/assets/rails-ujs.self-8944eaf3f9a2615ce7c830a810ed630e296633063af8bb7441d5702fbe3ea597.js?body=1"></script>
<script src="/assets/turbolinks.self-569ee74eaa15c1e2019317ff770b8769b1ec033a0f572a485f64c82ddc8f989e.js?body=1"></script>
<script src="/assets/articles.self-877aef30ae1b040ab8a3aba4e3e309a11d7f2612f44dde450b5c157aa5f95c05.js?body=1"></script>
<script src="/assets/bootstrap.self-fdc98dee79ee88255e10cac6caa91338165cb76cf0d263744d8d90011fc2ef8f.js?body=1"></script>
<script src="/assets/action_cable.self-69fddfcddf4fdef9828648f9330d6ce108b93b82b0b8d3affffc59a114853451.js?body=1"></script>
<script src="/assets/cable.self-8484513823f404ed0c0f039f75243bfdede7af7919dda65f2e66391252443ce9.js?body=1"></script>
<script src="/assets/octal.self-364e41a86713de4f2a1d22b511f99ca79eef4059e839c02b099ca2ee289884d6.js?body=1"></script>
<script src="/assets/relations.self-877aef30ae1b040ab8a3aba4e3e309a11d7f2612f44dde450b5c157aa5f95c05.js?body=1"></script>
<script src="/assets/users.self-877aef30ae1b040ab8a3aba4e3e309a11d7f2612f44dde450b5c157aa5f95c05.js?body=1"></script>
<script src="/assets/medium-editor.self-a4f361c2dcb6e54ca3400cb6cb9de9b0a38eddd36c417cd31f8add83ae7c422c.js?body=1"></script>
<script src="/assets/select2.self-1c5f606a53ee7fae6f11ffa522c8ccf8076493d9d5b5ae25564bd853679f48d2.js?body=1"></script>
<script src="/assets/auto_select2/static_select2.self-d4bd2ab2573f1ebb1355356089a29f4a863eeac5fe2ab8e71dc27c8c3faeb57d.js?body=1"></script>
<script src="/assets/auto_select2/ajax_select2.self-a9fcebdf470e2df0f8263df8f5d204a4f4a9e4bbde5299d8074af377f9dd233c.js?body=1"></script>
<script src="/assets/auto_select2/multi_ajax_select2_value_parser.self-b9df3fd4ad3813e60541ffb5bd90f7a2308d28bd590ba55e8e6894a62f106844.js?body=1"></script>
<script src="/assets/application.self-f74b421b6b3f8f87122d354a558aa64b553aee34b1bf06a7515456271b87a3c5.js?body=1"></script>
因此,问题的根源一定是资产预编译有问题吗?
我尝试重新启动Heroku并将Puma用作Heroku上的Web服务器,但这没什么不同。 (也许仍然是默认值?无法弄清楚。)
这些是仅在开发中加载的宝石:
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
没有仅在生产中装载的宝石。