title: digest_path & asset_digest_path not allowing digest URLs
body: <p>I have been having this pretty rough time with assets on production.  It came down to me trying to override the sprokets helper module to try and see what was up... When I re-wrote it to the following:</p>
  
  <pre><code>module Sprockets
    module Rails
      module Helper
        def compute_asset_path(path, options = {})
  </code></pre>
  
  <p>It would not run.  I tried it in my local environment, and it runs perfectly.  Is there a reason the production environment would not allow my assets to render in digest form, but my local environment would?  This is related to what this gent was asking...</p>
  
  <p><a href="https://stackoverflow.com/questions/22233508/rails-4-0-3-generating-incorrect-asset-paths-with-asset-sync?rq=1">Rails 4.0.3 generating incorrect asset paths with asset_sync</a></p>
  
  <p>Here is the error I receive after trying to override that method (which doesn't have an error when running with RAILS_ENV=development):</p>
  
  <pre><code>ActionView::Template::Error (undefined local variable or method `digest_path' for #&lt;#&lt;Class:0x000001034a99e0&gt;:0x000001034a81d0&gt;):
  </code></pre>
  
  <p>Asset Gems in Gemfile for reference:</p>
  
  <pre><code>source 'http://rubygems.org'
  # ruby '2.1.1'
  
  gem 'rails', '4.0.4'
  gem 'jbuilder', '~&gt; 1.2'
  gem 'devise'
  gem 'devise_invitable'
  gem 'figaro'
  gem 'mysql2'
  gem 'simple_form'
  gem 'kaminari'
  gem 'statistics'
  gem 'possessive'
  gem 'geocoder'
  gem 'nokogiri'
  gem 'asset_sync'
  gem 'sprockets-rails', :require =&gt; 'sprockets/railtie'
  gem 'ledermann-rails-settings', :require =&gt; 'rails-settings'
  gem 'public_activity'
  
  group :assets do
    gem 'therubyracer'
    gem 'sass-rails', '~&gt; 4.0.0'
    gem 'uglifier', '&gt;= 1.3.0'
    gem 'coffee-rails', '~&gt; 4.0.0'
  end
  
  group :development do
    gem 'better_errors'
    gem 'binding_of_caller', :platforms=&gt;[:mri_19, :mri_20, :rbx]
    gem 'guard-bundler'
    gem 'guard-rails'
    gem 'quiet_assets'
    gem 'rails_layout'
    gem 'rb-fchange', :require=&gt;false
    gem 'rb-fsevent', :require=&gt;false
    gem 'rb-inotify', :require=&gt;false
  end
  
  group :test do
    gem 'email_spec', '&gt;= 1.4.0'
    gem 'launchy', '&gt;= 2.2.0'
    gem 'capybara', '&gt;= 2.0.3'
    gem 'database_cleaner', '&gt;= 1.0.0.RC1'
    gem 'cucumber-rails', '&gt;= 1.3.1', :require =&gt; false
  end
  
  group :production do
    gem 'rails_12factor'
  end
  
  gem 'rspec-rails', '&gt;= 2.12.2', :group =&gt; [:development, :test]
  gem 'factory_girl_rails', '&gt;= 4.2.0', :group =&gt; [:development, :test]
  gem 'teaspoon', '&gt;= 0.7.4', :group =&gt; [:development, :test]
  gem 'cancan', '&gt;= 1.6.9'
  gem 'rolify', '&gt;= 3.2.0'
  gem 'stripe-rails'
  gem 'faker'
  gem 'open4'
  gem 'unf'
  </code></pre>
  
  <p>When I run this in development mode, it runs completely fine.  When I run this through production mode (even with the same config file) it does not inherit the View properties like <code>digest_path</code> or <code>asset_digest_path</code> is null or <code>manifest</code>, etc.</p>
  
  <pre><code>module Sprockets
    module Rails
      module Helper
  
        def compute_asset_path(path, options = {})
          if digest_path = asset_digest_path(path)
            path = digest_path if true # BUG: digest assets doesn't work on live, let's just bake it
            path += "?body=1" if options[:debug]
            File.join(assets_prefix || "/", path)
          else
            super
          end
        end
  
        def asset_digest_path(path, options = {})
          if manifest = assets_manifest
            if digest_path = manifest.assets[path]
              return digest_path
            end
          end
  
          if environment = assets_environment
            if asset = environment[path]
              return asset.digest_path
            end
          end
        end
  
      end
    end
  end
  
  module ActionView
    module Helpers
      module AssetUrlHelper
        def compute_asset_path(source, options = {})
          dir = ASSET_PUBLIC_DIRECTORIES[options[:type]] || ""
          File.join(dir, source)
        end
      end
    end
  end
  </code></pre>