Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue regarding custom template in lib directory #1364

Closed
ashrafuzzaman opened this issue Oct 20, 2012 · 1 comment
Closed

Issue regarding custom template in lib directory #1364

ashrafuzzaman opened this issue Oct 20, 2012 · 1 comment

Comments

@ashrafuzzaman
Copy link

Hi I have custom rails template in lib directory and when i run

rails g rails_admin:install

I get the following error.

gems/activesupport-3.2.3/lib/active_support/dependencies.rb:469:in `load': /home/jitu/projects/sympaticoschool/lib/templates/rails/scaffold_controller/controller.rb:1: syntax error, unexpected '<' (SyntaxError)
<% module_namespacing do -%>
 ^
/home/jitu/projects/sympaticoschool/lib/templates/rails/scaffold_controller/controller.rb:1: syntax error, unexpected keyword_do, expecting $end
<% module_namespacing do -%>
...........................
@mshibuya
Copy link
Member

I suppose you're placing ERB formatted template file named like foo.rb in lib dir.
If so, you'll need to rename them as foo.rb.erb to prevent parsing as plain ruby code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants