Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

asset precompile fails - Asset logical path has no extension: rails_admin/base/README #1343

Closed
wiemann opened this Issue Oct 1, 2012 · 5 comments

Comments

Projects
None yet
4 participants

wiemann commented Oct 1, 2012

I'm on rails 3.2 stable branch and use the master branch of rails_admin.

When deploying via capistrano I receive the following error:

** [out :: server] rake aborted!
** [out :: server] Asset logical path has no extension: rails_admin/base/README
** [out :: server]
** [out :: server] Tasks: TOP => assets:precompile:primary

Any idea how to fix that?

Collaborator

bbenezech commented Oct 2, 2012

Does it happen locally?
You should read the Rails documentation on Asset Pipeline if you haven't already, it's a tricky beast.
You may have a weird require in an asset somewhere?

Collaborator

gunn commented Oct 2, 2012

Actually, I think it would be this problem: sstephenson/sprockets#347
Make it README.txt till sprockets gets fixed

Collaborator

bbenezech commented Oct 2, 2012

Thanks @gunn

Any idea which README is causing this?

Collaborator

gunn commented Oct 2, 2012

I believe any file with no extension that would be pulled in by a sprockets require (e.g. require_tree) directive will cause it.

@gunn gunn closed this in 95a7af7 Oct 2, 2012

@jasiek jasiek added a commit to ministryofjustice/govuk_frontend_toolkit that referenced this issue Mar 11, 2014

@jasiek jasiek Fixes precompiling assets. 4942779

in your config.application.rb file

you can add

initializer 'setup_asset_pipeline', :group => :all do |app|
  # We don't want the default of everything that isn't js or css, because it pulls too many things in
  app.config.assets.precompile.shift
  # Explicitly register the extensions we are interested in compiling
  app.config.assets.precompile.push(Proc.new do |path|
    File.extname(path).in? [
      '.html', '.erb', '.haml', # Templates
      '.png', '.gif', '.jpg', '.jpeg', # Images
      '.eot', '.otf', '.svc', '.woff', '.ttf', # Fonts
    ]
  end)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment