rake assets:precompile fails when there are erb files?

50 views
Skip to first unread message

xop

unread,
Feb 21, 2012, 11:32:04 PM2/21/12
to Ruby on Rails: Talk
Hi,

I have a set of help pages that I want to put in the asset pipeline,
because I want to compile them once
and apply some erb changes to them.

I have them in a directory structure like this:
app/assets/helppages
and have only one file, named h22.html.erb

When I try to precompile the assets, I get this error:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rake assets:precompile
rake aborted!
undefined local variable or method `params' for #<#<Class:0x9590e58>:
0x95f2478>
(in /home//web/app/assets/helppages/h22.html.erb)

Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
rake aborted!

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

My h22.html.erb file has this in it:
<html>
<head>
<%= stylesheet_link_tag "stylesheet", :media => "all" %>
</head>
<body>

Any ideas what is going wrong?

Thanks!
David

Joe Straitiff

unread,
Apr 23, 2012, 4:48:03 PM4/23/12
to rubyonra...@googlegroups.com
Did you ever get a solution on this?  I'm encountering the same thing and trying to work it out.
Reply all
Reply to author
Forward
0 new messages