2015-01-14 2 views
2

Grails 2.4.4를 사용하고 ": sass-asset-pipeline : 1.9.2"를 컴파일하여 ": asset-pipeline : 1.9.9"를 컴파일합니다. 나는 다음과 같은 URL을 얻을 GSP보기에assetPath가 다른 URL을 반환합니다.

${assetPath(src: 'logoSmall.png', absolute: true)} 

를 사용

grails.serverURL = "http://mydomain.no-ip.biz:8080/myapp" 
grails.serverName = "mydomain.no-ip.biz" 

:

http://mydomain.no-ip.biz:8080/myapp/assets/logoSmall.png 

가있다

내 Config.groovy 파일은 다음과 같은 항목이 있습니다 올바른 URL. 내가 가진 서비스의 GSP보기를 렌더링 할 때

:

PageRenderer groovyPageRenderer 
... 

def contents = groovyPageRenderer.render(template: "/pathToMyGSP", model:[]) 

을 나는 내용이 내 경로가 될 볼 : 자산 이전/사라

http://mydomain.no-ip.biz:8080/myappassets/logoSmall.png 하는 것으로. g.render를 사용할 때 groovyPageRenderer.render를 사용할 때만 발생합니다. 발생하지 않습니다.

올바른 애셋 URL을 얻으려면 어떻게해야합니까?

답변

2

This bug has been fixed 더 최신 버전의 asset-pipeline plugin (2.0.21, 내가 생각하기에).

+0

문제점은 sass-asset-pipeline에서 version> 2.0이 작동하지 않는다는 것입니다 : 1.9.2 – confile

+1

'sass-asset-pipeline'이 업데이트 될 때까지는이 변경 사항을' 자산 파이프 라인 : 1.9.9' https://github.com/bertramdev/asset-pipeline/commit/7135ec919e7e1a1c4c681fe91420b94f877f09b1 –

관련 문제