{"action":"created","issue":{"url":"https://api.github.com/repos/gruntjs/grunt-contrib-compass/issues/220","labels_url":"https://api.github.com/repos/gruntjs/grunt-contrib-compass/issues/220/labels{/name}","comments_url":"https://api.github.com/repos/gruntjs/grunt-contrib-compass/issues/220/comments","events_url":"https://api.github.com/repos/gruntjs/grunt-contrib-compass/issues/220/events","html_url":"https://github.com/gruntjs/grunt-contrib-compass/issues/220","id":54412934,"number":220,"title":"Grunt and Compass seem to have different ideas on httpPath","user":{"login":"mishtershmart","id":2113020,"avatar_url":"https://avatars.githubusercontent.com/u/2113020?v=3","gravatar_id":"","url":"https://api.github.com/users/mishtershmart","html_url":"https://github.com/mishtershmart","followers_url":"https://api.github.com/users/mishtershmart/followers","following_url":"https://api.github.com/users/mishtershmart/following{/other_user}","gists_url":"https://api.github.com/users/mishtershmart/gists{/gist_id}","starred_url":"https://api.github.com/users/mishtershmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mishtershmart/subscriptions","organizations_url":"https://api.github.com/users/mishtershmart/orgs","repos_url":"https://api.github.com/users/mishtershmart/repos","events_url":"https://api.github.com/users/mishtershmart/events{/privacy}","received_events_url":"https://api.github.com/users/mishtershmart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-15T05:03:06Z","updated_at":"2015-03-17T15:33:43Z","closed_at":null,"body":"Hi there,\r\n\r\nI'm new to Grunt – loving it so far (bye bye Codekit) – but I'm having an issue where the output of any compass url helpers (image-url(), font-url()) contains the incorrect path. Here is my gruntfile;\r\n````\r\nmodule.exports = function (grunt) {\r\n    grunt.initConfig(\r\n        {\r\n            pkg        : grunt.file.readJSON('package.json'),\r\n            compass    : {\r\n                dev : {\r\n                    options : {\r\n                        httpPath       : '/',\r\n                        sassDir        : 'scss/scss',\r\n                        cssDir         : 'css/compiled',\r\n                        imagesDir      : 'images',\r\n                        javascriptsDir : 'js',\r\n                        fontsDir       : 'fonts',\r\n                        outputStyle    : 'nested',\r\n                        relativeAssets : true\r\n                    }\r\n                }\r\n            },\r\n            cssmin     : {\r\n                dev : {\r\n                    files : {\r\n                        'css/min/ctips-global.min.css' : [\r\n                            'css/compiled/global/base.css',\r\n                            'css/compiled/global/header.css',\r\n                            'css/compiled/global/footer.css',\r\n                            'css/compiled/global/navigation.css',\r\n                            'css/compiled/global/entry-content.css',\r\n                            'css/compiled/global/widgets.css',\r\n                            'css/compiled/global/animations.css'\r\n                        ]\r\n                    }\r\n                }\r\n            },\r\n            uglify     : {\r\n                options : {\r\n                    mangle : false\r\n                },\r\n                dev     : {\r\n                    files : {\r\n                        'js/min/modernizr-latest.min.js' : ['js/vendor/modernizr/modernizr-latest.js']\r\n                    }\r\n                }\r\n            },\r\n            watch      : {\r\n                css : {\r\n                    files   : ['scss/scss/**', 'Gruntfile.js'],\r\n                    tasks   : ['compass', 'cssmin'],\r\n                    options : {\r\n                        nospawn : true\r\n                    }\r\n                },\r\n                js  : {\r\n                    files : ['Gruntfile.js'],\r\n                    tasks : ['uglify']\r\n                }\r\n            },\r\n            concurrent : {\r\n                options : {\r\n                    logConcurrentOutput : true\r\n                },\r\n                dev     : {\r\n                    tasks : ['watch:css', 'watch:js']\r\n                }\r\n            }\r\n        });\r\n    grunt.loadNpmTasks('grunt-concurrent');\r\n    grunt.loadNpmTasks('grunt-contrib-uglify');\r\n    grunt.loadNpmTasks('grunt-contrib-watch');\r\n    grunt.loadNpmTasks('grunt-contrib-cssmin');\r\n    grunt.loadNpmTasks('grunt-contrib-compass');\r\n    grunt.registerTask('default', ['compass', 'cssmin', 'uglify']);\r\n    grunt.registerTask('dev', ['concurrent:dev']);\r\n};\r\n````\r\nWhen I run `grunt dev` Grunt runs without any warnings, but the output of the compass url helpers is always missing the directory where the gruntfile exists. \r\n\r\nWhen I add the directory in as follows ...\r\n````\r\n...\r\noptions : {\r\n                        httpPath       : '/',\r\n                        sassDir        : 'scss/scss',\r\n                        cssDir         : 'css/compiled',\r\n                        imagesDir      : 'mydirectory/images',\r\n                        javascriptsDir : 'js',\r\n                        fontsDir       : 'mydirectory/fonts',\r\n                        outputStyle    : 'nested',\r\n                        relativeAssets : true\r\n                    }\r\n...\r\n````\r\n... the resulting output is correct, yet grunt throws a series of warnings saying that it can't find the resources. An example of the error is as follows;\r\n`WARNING: 'Brown-Regular.eot' was not found (or cannot be read) in /Applications/MAMP/htdocs/website.com.au/website/content/themes/mydirectory/mydirectory/fonts`\r\n\r\nSo it seems there is some disparity between where compass thinks the httpPath is and where Grunt thinks it is in my project, but I'm not sure how to fix this."},"comment":{"url":"https://api.github.com/repos/gruntjs/grunt-contrib-compass/issues/comments/82416828","html_url":"https://github.com/gruntjs/grunt-contrib-compass/issues/220#issuecomment-82416828","issue_url":"https://api.github.com/repos/gruntjs/grunt-contrib-compass/issues/220","id":82416828,"user":{"login":"richardcalahan","id":753757,"avatar_url":"https://avatars.githubusercontent.com/u/753757?v=3","gravatar_id":"","url":"https://api.github.com/users/richardcalahan","html_url":"https://github.com/richardcalahan","followers_url":"https://api.github.com/users/richardcalahan/followers","following_url":"https://api.github.com/users/richardcalahan/following{/other_user}","gists_url":"https://api.github.com/users/richardcalahan/gists{/gist_id}","starred_url":"https://api.github.com/users/richardcalahan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardcalahan/subscriptions","organizations_url":"https://api.github.com/users/richardcalahan/orgs","repos_url":"https://api.github.com/users/richardcalahan/repos","events_url":"https://api.github.com/users/richardcalahan/events{/privacy}","received_events_url":"https://api.github.com/users/richardcalahan/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T15:33:43Z","updated_at":"2015-03-17T15:33:43Z","body":"I had the same issue, setting relativeAssets to true fixed the problem for me. But yes, this is a confusing discrepancy. "}}