저는 레일즈와 헤로크를 처음 접했고 누군가 제가 가지고있는 문제로 나를 도울 수 있기를 바랬습니다. 삼나무 더미가 있습니다. 내가 밀어 넣을 때 config.assets.initialize_on_precompile = false를 내 application.rb 파일에 추가했습니다. 'Running : rake assets : precompile. 내 jquery - ui - 1.8.18custom.css 파일에 대한 언급은 구체적으로 보이지 않습니다. 내가 heroku 로그를 실행할 때이 파일이 미리 컴파일되지 않는다고 불평합니다. 내가 놓친 게 있니? 로컬에서 프리 컴파일하려고하면 그냥 멈추지 만, 어쨌든 로컬에서는 수행하지 말아야한다.heroku 시더에서 jquery UI 파일로 프리 컴파일 문제가 발생했습니다.
제안 사항?
여기 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 프리 컴파일을 실행했는데 여전히 오류가 발생했다.
나는이처럼 내 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
설명이 오류는 여전히 heroku에 precompiled되지 않습니다, 그것은 여전히 로컬로 괜찮아 보인다. – turbo2oh
애셋 파이프 라인을 사용할 때 애셋에 직접 연결하면 안됩니다. http://guides.rubyonrails.org/asset_pipeline.html –