0
votes

I'm using the ember-rails gem and following along with the starter screencast on the Emberjs.com site. When I create this link

 <li>{{#link-to 'about'}} About {{/link-to}}</li>

It's giving me this error

Uncaught Error:  Handlebars error: Could not find property 'link-to' on object <(generated application controller):ember280>. 

There's a StackOverflow question that deals with this issue Helpers not properly defined in application template?. One answer says that

When you use Handlebars.compile it uses the handlebars script instead of the Ember script. Ember has its own handlebars object that extends the original Handlebars object with extra templates.

and gives this example

Ember.TEMPLATES["application"] = Ember.Handlebars.compile("{{#linkTo 'dashboard'}}Dashboard{{/linkTo}}")

However, I'm unclear where to put that code, and would it need to be done for every link?

1
Maybe you're running an old version of the ember-rails gem, tried running bundle update? Or rails generate ember:install --head if you previously have pulled the latest builds.kroofy

1 Answers

1
votes

I suspect you're running an older version of ember. Try running this to get the latest version of Ember into your app.

rails generate ember:install --head