Skip to content


fix for file not found issues #71

merged 1 commit into from

2 participants


I was running into an issue with the tinymce gem, some files were not there but ti was expecting them, so it would crap out. I just moved the code behind guards and now it works for me. Not sure if you'd like to add this to them gem, but it would be much appreciated!

@ndbroadbent ndbroadbent merged commit 4236d57 into ndbroadbent:master

1 check passed

Details default The Travis CI build passed

OK, this looks fine to me, thanks! Have released 0.3.7 with your change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 14, 2013
  1. @gnovos

    fix for file not found issues

    gnovos committed
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 3 deletions.
  1. +1 −0  .gitignore
  2. +3 −3 lib/sprockets/static_non_digest_generator.rb
1  .gitignore
@@ -5,3 +5,4 @@ tmp
6 lib/sprockets/static_non_digest_generator.rb
@@ -36,10 +36,10 @@ def generate
abs_digest_path = "#{@target}/#{digest_path}"
abs_logical_path = "#{@target}/#{logical_path}"
- mtime = File.mtime(abs_digest_path)
# Remove known digests from css & js
if abs_digest_path.match(/\.(?:js|css)$/)
+ mtime = File.mtime(abs_digest_path)
asset_body =
# Find all hashes in the asset body with a leading '-'
@@ -68,7 +68,7 @@ def generate
# Otherwise, treat file as binary and copy it.
# Ignore paths that have no digests, such as READMEs
- unless abs_digest_path == abs_logical_path
+ unless !File.exist?(abs_digest_path) || abs_digest_path == abs_logical_path
FileUtils.cp_r abs_digest_path, abs_logical_path, :remove_destination => true
env.logger.debug "Copied binary asset to #{logical_path}"
Something went wrong with that request. Please try again.