Skip to content

Instantly share code, notes, and snippets.

@schneems
Last active May 16, 2017 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schneems/c08c6881e28b8f9417973ba96c88c1f0 to your computer and use it in GitHub Desktop.
Save schneems/c08c6881e28b8f9417973ba96c88c1f0 to your computer and use it in GitHub Desktop.

one way to check to see if absolute paths are being used in the cache on different machines is to figure out the current path

$ pwd

Then grep for things with that absolute path in it:

~ $ grep -R "$(pwd)" tmp/cache

Then take a look at a few of the cache entries for example:

Binary file tmp/cache/assets/sprockets/v3.0/DxZwkv1F0Oyh91zGcrWkQPfAZ9LKbVH5VpR33B8hFGo.cache matches

You can view it with:

$ cat tmp/cache/assets/sprockets/v3.0/DxZwkv1F0Oyh91zGcrWkQPfAZ9LKbVH5VpR33B8hFGo.cache

I think that Sass gets around the "relative path" problem by storing the absolute path and the root of the directory where the asset was created so that it can calculate a relative path. So you may see some things like this:

@fileI"~/tmp/build_0f72a2da4869da078b6395b165d1eaf6/vendor/bundle/ruby/2.3.0/gems/bourbon-4.2.5/app/assets/stylesheets/css3/_calc.scss; T:@importero:Sass::Rails::SassImporte:
@rootI"s/tmp/build_0f72a2da4869da078b6395b165d1eaf6/vendor/bundle/ruby/2.3.0/gems/bourbon-4.2.5/app/assets/stylesheets; F:@real_rootI"s/tmp/build_0f72a2da4869da078b6395b165d1eaf6/vendor/bundle/ruby/2.3.0/gems/bourbon-4.2.5/app/assets/stylesheets;  T:@same_name_warningsoSet:

Even so, maybe it's a worthwhile debugging step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment