2012-03-14 14 views
1

私はレールと英雄に慣れていて、私が持っている問題で誰かが私を助けてくれることを望んでいました。私はシダースタックを持っています。プッシュすると、config.assets.initialize_on_precompile = falseを私のapplication.rbファイルに追加しました。これは、「Running:rake assets:precompile」です。私は特に私のjquery-ui-1.8.18custom.cssファイルの言及は特に見えません。私がherokuログを実行すると、このファイルはプリコンパイルされていないと不平を言う。何か不足していますか?ローカルでプリコンパイルしようとするとハングアップするだけですが、私の理解では、ローカルでもそれにも当てはまらないようにローカルで行う必要はありません。jroeryとjereryのファイルを使用して英雄杉のプリコンパイルに問題があります

提案がありますか?

はここにHerokuの上で私のプッシュの終わりです:

Running: rake assets:precompile 
    /usr/local/bin/ruby /tmp/build_3gao4dm3wwned/vendor/bundle/ruby/1.9.1/bin 
/rake assets:precompile:nondigest RAILS_ENV=production RAILS_GROUPS=assets 
-----> Rails plugin injection 
    Injecting rails_log_stdout 
    Injecting rails3_serve_static_assets 
-----> Discovering process types 
    Procfile declares types  -> (none) 
    Default types for Ruby/Rails -> console, rake, web, worker 
-----> Compiled slug size is 16.2MB 
-----> Launching... done, v82 
    http://MYAPPNAME.herokuapp.com deployed to Heroku 

は、ここに私のエラーログです:

2012-03-14T15:40:29+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms 

2012-03-14T15:40:29+00:00 app[web.1]: Rendered homes/index.html.erb within layou 
ts/application (0.4ms) 
2012-03-14T15:40:29+00:00 app[web.1]:  2: <html> 
2012-03-14T15:40:29+00:00 app[web.1]: 
2012-03-14T15:40:29+00:00 app[web.1]: ActionView::Template::Error (jquery-ui-1.8 
.18.custom isn't precompiled): 

UPDATE:

は私が制作に真config.assets.compileを=追加しました。それは問題を解決したようです。これに問題はありますか?

代わりに私はこれをapplication.rbに追加してみました:onfig.assets.precompile + =%w(* .js * .css)そしてrakeプリコンパイルを実行していて、まだエラーが出ていました。

答えて

1

これは2つの可能性があります。あなたの意見から資産への直接リンクしようとしているなら、あなたは、コンパイルを事前にそれを設定する必要があります。

http://neilmiddleton.com/precompiling-non-default-assets-with-rails-3/

場合は、しかし、それは木にだけだとあなたはそれが期待していますapplication.cssに含まれている場合は、それがマニフェストの中か、含まれているツリーの1つに含まれていることを確認する必要があります。例えば

application.css):

/* 
* This is a manifest file that'll automatically include all the stylesheets available in this directory 
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at 
* the top of the compiled file, but it's generally better to create a new file per style scope. 
*= require_self 
*= require "reset" 
*= require "base" 
*= require "jquery-ui-1.8.18.custom" 
*/ 
+0

私はこのように私application.html.erbファイルでそれにリンクしています: <%=をstylesheet_link_tag 'jqueryの-UI-1.8.18.custom'、 'アプリケーション'%>。私はapplication.cssファイルを次のように編集しようとしました:* = require_self * = require_tree * = "jquery-ui-1.8.18.custom"が必要です。私はエラー – turbo2oh

+0

を明らかにする、エラーはまだそれがプリコンパイルされていないherokuに隣接している、それはまだローカルによく見える。 – turbo2oh

+0

アセットパイプラインを使用する場合、アセットに直接リンクしないでください。 http://guides.rubyonrails.org/asset_pipeline.html –

関連する問題