2012-02-01 90 views
4

這是Rails資產中的錯誤嗎? 我看不出我做錯了什麼。你能幫忙嗎? 我不想做點播編譯...Ruby on Rails 3.2編譯資產不起作用

的錯誤:

Started GET "/" for 127.0.0.1 at 2012-02-02 01:25:44 +0200 
Processing by StaticPagesController#home as HTML 
    Rendered static_pages/home.html.erb within layouts/application (11.8ms) 
    Rendered layouts/_stylesheets.html.erb (3.1ms) 
Completed 500 Internal Server Error in 33ms 

ActionView::Template::Error (blueprint/screen.css isn't precompiled): 
    1: <!--[if lt IE 9]> 
    2: <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> 
    3: <![endif]--> 
    4: <%= stylesheet_link_tag 'blueprint/screen', media: 'screen' %> 
    5: <%= stylesheet_link_tag 'blueprint/print', media: 'print' %> 
    6: <!--[if lt IE 8]><%= stylesheet_link_tag 'blueprint/ie' %><![endif]--> 
    7: <%= stylesheet_link_tag "application", :media => "all" %> 
    app/views/layouts/_stylesheets.html.erb:4:in `_app_views_layouts__stylesheets_html_erb___420254603692159600_23189320' 
    app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___3529609308555441821_21997000' 

production.rb

config.serve_static_assets = true 
... 
config.assets.precompile += %w(blueprint/screen.css blueprint/print.css blueprint/ie.css) 

production.log

Compiled jquery.js (1ms) (pid 14042) 
Compiled jquery_ujs.js (0ms) (pid 14042) 
Compiled static_pages.js (59ms) (pid 14042) 
Compiled users.js (1ms) (pid 14042) 
Compiled application.js (84ms) (pid 14042) 
Compiled layout.css (14ms) (pid 14042) 
Compiled static_pages.css (0ms) (pid 14042) 
Compiled users.css (0ms) (pid 14042) 
Compiled application.css (24ms) (pid 14042) 
Compiled blueprint/ie.css (0ms) (pid 14042) 
Compiled blueprint/print.css (0ms) (pid 14042) 
Compiled blueprint/screen.css (0ms) (pid 14042) 
+0

JUP ...我也有類似的問題。你在用mongodb嗎? – xpepermint 2012-02-15 18:18:17

+0

不,我沒有使用MongoDB。 – 2012-02-15 21:35:12

+0

我有相同的問題,並且剛剛放棄。我甚至用我的一位職業鐵桿開發者的朋友跑了這個,他也忍不住。這是我的帖子http://stackoverflow.com/questions/10177186/asset-precompilation-error-from-blueprint-css-actionviewtemplateerror-blu – 2012-05-07 20:25:54

回答

1

嘗試bundle exec rake assets:precompile 然後檢查公共/資產文件夾中是否有所有必需的資產。

+0

我有這個相同的問題,是的,我可以預先編譯資產在本地,和他們表現得很好。看看我的帖子,看看問題的全部範圍:http://stackoverflow.com/questions/10177186/asset-precompilation-error-from-blueprint-css-actionviewtemplateerror-blu – 2012-05-07 20:29:51