0

I'm newbie to ember.js. I'm trying to integrate ember.js with Rails using ember-rails gem. But when I start server and open my browser console I get following errors:

Uncaught Error: assertion failed: Ember Views require jQuery 1.7 :3000/assets/ember.js?body=1:43
Uncaught TypeError: Cannot call method 'extend' of undefined :3000/assets/ember-data.js?body=1:141
Uncaught ReferenceError: Blog is not defined :3000/assets/store.js?body=1:1
Uncaught ReferenceError: Blog is not defined :3000/assets/controllers/application_controller.js?body=1:1
Uncaught ReferenceError: Blog is not defined :3000/assets/views/application_view.js?body=1:1
Uncaught TypeError: Cannot call method 'template' of undefined :3000/assets/templates/application.js?body=1:1
Uncaught ReferenceError: Blog is not defined :3000/assets/routes/app_router.js?body=1:1
Uncaught ReferenceError: Blog is not defined :3000/assets/blog.js?body=1:10
Uncaught TypeError: Cannot call method 'create' of undefined ember.js:10183
Uncaught ReferenceError: Blog is not defined 

How to solve it? Or how to integrate ember.js to rails by manually.

Thank you for advise.

1 Answer 1

2

Here's the issue with ember-rails (https://github.com/emberjs/ember-rails/issues/88)

To force jquery to be 1.7, you can use the version 1.0.19 of the jquery-rails gem. So change your Gemfile to be:

gem "jquery-rails", "1.0.19"

And you'll be set.

As an alternative, you could follow the suggestion in the GH issue, and

var ENV = {'FORCE_JQUERY': true};

before the ember.js is loaded to override the requirement check for any version of jquery. (I have not tested this).

1
  • Thank you for reply. I really don't like oldest version of any gem. I think this gem is gone. Trying to integrate manually :(
    – Zeck
    Oct 5, 2012 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.