backporting fix to rails/rails#8119 from
https://github.com/rails/rails/commit/445f14e97553de552745de26ebd5e49bc5c82f4e
(e.g. to deal with jasmine-rails spec/assets paths)