mercredi 28 octobre 2015

ember-rails Ember Inspector does not detect app

I'm using rails 4 with:

gem 'ember-rails'
gem 'ember-source', '2.0'

ember-rails is at version 0.19 in my Gemfile.lock. I'm very new to ember (and javascript frameworks in general) and I'm following this tutorial. It was written in April 2014 so I think it might be out of date but it's the most recent guide to ember-rails with rails 4 that I can find.

Most of the setup was generated by running rails generate ember:bootstrap and application.js.coffee looks like this:

#= require jquery
#= require jquery_ujs
#= require ember
#= require ember-data
#= require active-model-adapter
#= require_self
#= require api

# for more details see: http://ift.tt/XTBcuN
window.Api = Ember.Application.create()

Also api.js.coffee looks like this:

#= require_tree ./adapters
#= require_tree ./mixins
#= require_tree ./models
#= require_tree ./controllers
#= require_tree ./views
#= require_tree ./helpers
#= require_tree ./components
#= require_tree ./templates
#= require_tree ./routes
#= require ./router
#= require_self

My problem is that when I click on the ember inspector in Chrome's developer tools, I get the 'Ember application not detected' message. The two coffeescript files I referenced above are the only two files the tutorial has talked about so far so I think the error might be with one of them. If you need more information please let me know. When I run the rails server then try to access the Ember Inspector this is what I see in the console:

DEBUG: -------------------------------

DEBUG: Ember : 2.0.0

DEBUG: Ember Data : 2.1.0

DEBUG: jQuery : 1.11.3

DEBUG: -------------------------------

Uncaught TypeError: this.validateFullName is not a function

Ember Inspector Active




Aucun commentaire:

Enregistrer un commentaire