레일 4로 업그레이드 한 후에 public/assets/manifest.yml이 더 이상 생성되지 않습니다. 대신 형식이 다른 매니 페스트 (지문) .json이 있습니다. 하지만 서버가 여전히 .json 버전을 무시하고 이전 manifest.yml 형식을 찾고있는 것 같습니다.레일 4, Heroku가 미리 컴파일 된 매니페스트 (지문)를 인식하지 못합니다 .json
비슷한 문제를 기반으로하는 다른 질문이 있지만 Rails 4로 업그레이드하고, gem 파일에 rails_12factor를 추가하고, serve_static_assets = true 등을 설정하여 문제를 해결할 것으로 보입니다. 그러나 이러한 해결책 중 어느 것도 내 시나리오.
저는이 성가신 문제로 인해 지치고 영감을 받았습니다. 어떤 도움도 받으실 수 있습니다! Heroku가에서
로그 파일 :
ActionController::RoutingError (No route matches [GET] "/assets/layouts/test/test.html"):
Gemfile :
ruby '2.0.0'
gem 'rails', '4.0.0'
...
gem "compass-rails", github: "milgner/compass-rails", ref: "1749c06f15dc4b058427e7969810457213647fb8"
...
gem 'rails_12factor', group: :production
production.rb 내가 각도과 UI 라우터를 사용하고,이 중 일부입니다
RailsFoundationAngular::Application.configure do
config.assets.initialize_on_precompile = false
config.cache_classes = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_assets = true
config.assets.compress = true
config.assets.compile = false
config.assets.digest = true
config.i18n.fallbacks = true
config.active_support.deprecation = :notify
config.action_dispatch.x_sendfile_header = nil
end
test.html이 연결된 내 routes.js.coffee :
.state "root",
url: "/"
views:
"root":
controller: "ApplicationController"
templateUrl: "/assets/layouts/test/test.html"
로컬에서도 프리 컴파일을 시도했지만 여기서도 레일 4를 사용하고 있기 때문에 manifest.yml은 생성되지 않고 .json 버전 만 생성됩니다. 물론 , 모든
... 개발 단지 완벽하게 작동하고 그래서 내 실제 cuestion : 나는 Heroku가 인식하고 확인하기 위해 manifest- (지문) .json - 파일, 또는 다른 방법을 사용하도록 할 방법 이 일?
이제 실제로 사용할 수있는 해결 방법을 찾았습니다. [Rails의 자산/이미지와 일치하는 경로 없음] (http://stackoverflow.com/a/11128672/2597056). routes.js.coffee를 routes.js.coffe.erb로 이름을 변경했으며 링크 된 파일을'templateUrl : "<% = asset_path ('layouts/test/test.html') %>"'로 변경했습니다. 이제는 souce의 모든 파일 참조를 이와 같이 변경해야합니다. 사실, 이것이 정확히 매니페스트 파일이 나를 위해 무엇을 할 것으로 예상했는지 생각했습니다. – RastacraZ