Skip to content

Commit

Permalink
Merge pull request #414 from rails/schneems/more-error-stuff
Browse files Browse the repository at this point in the history
Schneems/more error stuff
  • Loading branch information
rafaelfranca committed Dec 12, 2017
2 parents 5847306 + 3c7ff8a commit 857e781
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/sprockets/rails/helper.rb
Expand Up @@ -7,15 +7,16 @@ module Sprockets
module Rails
module Helper
class AssetNotFound < StandardError; end
class AssetNotPrecompiled < StandardError; end

class AssetNotPrecompiled < StandardError
class AssetNotPrecompiledError < AssetNotPrecompiled
include Sprockets::Rails::Utils
def initialize(source)
msg =
if using_sprockets4?
"Asset `#{ source }` was not declared to be precompiled in production.\n" +
"Declare links to your assets in `app/assets/config/manifest.js`.\n\n" +
" //= link #{ source }\n" +
" //= link #{ source }\n\n" +
"and restart your server"
else
"Asset was not declared to be precompiled in production.\n" +
Expand Down

0 comments on commit 857e781

Please sign in to comment.