我的Rails應用程序在我的本地Ubuntu機器上運行良好,但是當我將其推送到heroku並訪問網站時,該應用程序崩潰並出現以下錯誤。Heroku崩潰在.sass文件上的應用程序
2011-09-26T03:45:52+00:00 heroku[web.1]: State changed from created to starting
2011-09-26T03:45:54+00:00 heroku[web.1]: Starting process with command `thin -p 7208 -e production -R /home/heroku_rack/heroku.ru start`
2011-09-26T03:46:00+00:00 app[web.1]: WARNING on line 640 of /app/app/stylesheets/simpla/style.sass:
2011-09-26T03:46:00+00:00 app[web.1]: This selector doesn't have any properties and will not be rendered.
2011-09-26T03:46:03+00:00 app[web.1]: WARNING: 'ui-ui-bg_flat_0_000000_40x100.png' was not found (or cannot be read) in /app/public/images
2011-09-26T03:46:03+00:00 app[web.1]: WARNING on line 122 of /app/app/stylesheets/calendar/jquery.weekcalendar.sass:
2011-09-26T03:46:03+00:00 app[web.1]: This selector doesn't have any properties and will not be rendered.
2011-09-26T03:46:03+00:00 app[web.1]: WARNING on line 214 of /app/app/stylesheets/calendar/jquery.weekcalendar.sass:
2011-09-26T03:46:03+00:00 app[web.1]: This selector doesn't have any properties and will not be rendered.
2011-09-26T03:46:03+00:00 app[web.1]: WARNING on line 122 of /app/app/stylesheets/calendar/jquery.weekcalendar.sass:
2011-09-26T03:46:03+00:00 app[web.1]: This selector doesn't have any properties and will not be rendered.
2011-09-26T03:46:03+00:00 app[web.1]: WARNING on line 214 of /app/app/stylesheets/calendar/jquery.weekcalendar.sass:
2011-09-26T03:46:03+00:00 app[web.1]: This selector doesn't have any properties and will not be rendered.
2011-09-26T03:46:03+00:00 app[web.1]: /app/app/stylesheets/calendar/jquery.weekcalendar.sass:6:in `linear-gradient': Undefined mixin 'linear-gradient'. (Sass::SyntaxError)
2011-09-26T03:46:03+00:00 app[web.1]: from /app/app/stylesheets/calendar/jquery.weekcalendar.sass:6
2011-09-26T03:46:03+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/sass-3.1.7/lib/sass/../sass/tree/visitors/perform.rb:169:in `visit_mixin'
2011-09-26T03:46:03+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/sass-3.1.7/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
2011-09-26T03:46:03+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/sass-3.1.7/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
2011-09-26T03:46:03+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/sass-3.1.7/lib/sass/../sass/tree/visitors/perform.rb:18:in `visit'
2011-09-26T03:46:03+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/sass-3.1.7/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
2011-09-26T03:46:03+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.8/gems/sass-3.1.7/lib/sass/../sass/tree/visitors/base.rb:53:in `map'
.
.
2011-09-26T03:46:04+00:00 heroku[web.1]: Process exited
2011-09-26T03:46:04+00:00 heroku[web.1]: State changed from starting to crashed
2011-09-26T03:47:27+00:00 heroku[slugc]: Slug compilation started
我的應用程序/樣式表/日曆/ jquery.weekcalendar.sass在開頭以下:
.wc-container
font-size: 14px
font-family: arial, helvetica
.wc-toolbar
+linear-gradient(color-stops(#EFEFEF, #D5D5D5))
border: 1px solid #DADADA
padding: 1em
font-size: 0.8em
.wc-nav
float: left
.wc-display
float: right
button
margin-top: 0
margin-bottom: 0
.wc-title
text-align: center
padding: 0
margin: 0
6行是一個與「+線性梯度(彩色停止(# EFEFEF,#D5D5D5))「。我的本地機器不會抱怨這一行,我想知道爲什麼heroku在抱怨。
在推送到heroku之前,您是否嘗試過編譯它們? – thomasfedb
是的,我跑了捆綁,測試了一下,然後推到了heroku。僅供參考,我做了一些研究,認爲有一些複雜的b/w heroku和sass。在我的Gemfile中,我有: gem'hassle',:git =>'git://github.com/Papipo/hassle.git', :ref =>「3a12feb7ae8c94acde7b」 – rapidror
經過更多研究,我發現線性漸變定義在我的本地機器上的./vendor/bundle/ruby/1.8/gems/compass-0.10.6/frameworks/compass/stylesheets/compass/css3/_gradient.scss,我使用rails 3.0.3。仍然沒有解決方案... – rapidror