2017-05-18 1 views
5

Rails 5.1에서는 공용 폴더에있는 파일에 대해 asset_path를 사용하면 더 이상 사용되지 않는다는 경고가 표시됩니다. Rails 5.1 : 공용 폴더의 파일에 대한 url 도우미

DEPRECATION WARNING: The asset "favicon.ico" is not present in the asset pipeline.Falling back to an asset that may be in the public folder. This behavior is deprecated and will be removed.

그래서 내가 public_asset_path을 시도했지만 작동하지 않는, 도우미가?

+0

내가 외부 자원을 참조하고 같은 오류를 가지고있는/application_helper.rb

module ApplicationHelper def public_path(path) "#{ Rails.env.development? ? 'http://localhost:3000/' : 'https://cdn.mysite.fr/' }#{ path }" end end 

하고 내가 사용할 수 있습니다 public_path('images/image.jpg')에서이 방법을 추가 즉 : aws 또는 다른 곳의 이미지 –

+0

아직 찾은 해결책은 없습니까? –

+0

아니요, 아직 대기 중입니다. –

답변

0

그래서 나는, 헬퍼 전망

관련 문제