1

出于某种原因,简单地安装 gem delayed_job_active_record 会导致我的 heroku 应用程序崩溃。

我已经运行了以下步骤:添加到 gem 文件中:

gem "delayed_job_active_record"

终端:

bundle install
rails generate delayed_job:active_record
rake db:migrate
git add .
git commit -m "added delayed_job gem"
git push
git push heroku master
heroku run rake db:migrate
heroku ps:scale worker=1

一切安装都没有错误,但是当我加载页面时,我的 heroku 日志显示以下内容:

WARN: tilt autoloading 'sass' in a non thread-safe way; explicit require 'sass' suggested.
2012-07-07T19:47:14+00:00 app[web.1]:     5:   <%= stylesheet_link_tag    "application", :media => "all" %>
2012-07-07T19:47:14+00:00 app[web.1]:     8:   <%= yield :head %>
2012-07-07T19:47:14+00:00 app[web.1]:   (in /app/app/assets/stylesheets/custom.css.scss)):
2012-07-07T19:47:14+00:00 app[web.1]:     2: <html xmlns:fb="http://ogp.me/ns/fb#">
2012-07-07T19:47:14+00:00 app[web.1]:   app/assets/stylesheets/custom.css.scss:1
2012-07-07T19:47:14+00:00 app[web.1]: 
2012-07-07T19:47:14+00:00 app[web.1]: Completed 500 Internal Server Error in 1465ms
2012-07-07T19:47:14+00:00 app[web.1]: 
2012-07-07T19:47:14+00:00 app[web.1]: Load path: /app
2012-07-07T19:47:14+00:00 app[web.1]:     7:   <%= csrf_meta_tags %>
2012-07-07T19:47:14+00:00 app[web.1]:   app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb__1868084818636776228_47102160'
2012-07-07T19:47:14+00:00 app[web.1]: ActionView::Template::Error (File to import not found or unreadable: bootstrap.

当我卸载 gem 时,程序恢复没有错误。如果我在本地主机上运行,​​我也没有任何问题。仅当我加载delayed_job gem 时才会发生错误(即使除了安装它我什么都不做)

任何帮助,将不胜感激!

谢谢你。

4

1 回答 1

2

对于将来想知道的任何人......这解决了它:

将以下内容添加到 application.rb:

config.assets.initialize_on_precompile = false
于 2012-07-08T20:30:20.013 回答