Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
wiemann opened this Issue · 5 comments

4 participants

@wiemann

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?

@bbenezech
Collaborator

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?

@gunn
Collaborator

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

@bbenezech
Collaborator

Thanks @gunn

Any idea which README is causing this?

@gunn
Collaborator

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
@jasiek jasiek referenced this issue from a commit in ministryofjustice/govuk_frontend_toolkit
@jasiek jasiek Fixes precompiling assets. 4942779
@mzaragoza

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
Something went wrong with that request. Please try again.