leshill / handlebars_assets

Use handlebars.js templates with the Rails asset pipeline.
MIT License
649 stars 159 forks source link

NoMethodError: undefined method `[]' for nil:NilClass #155

Closed ankita-miipl closed 7 years ago

ankita-miipl commented 7 years ago

I am upgrading my rails application from rails 3.2.1 to rails 4. previously it was usinf 0.15 version of handlebars and after upgrading to rails 4 it is giving me an error like NoMethodError: undefined method `[]' for nil:NilClass which is produce when i include the view path (//= require_tree ../portfolio_submission/views/ ) in my application.js.

ankita-miipl commented 7 years ago

Added following lines in initializer work for me..

::HandlebarsAssets.configure do |config| config.path_prefix = 'assets' end