Skip to content

Instantly share code, notes, and snippets.

@marcbowes
Last active December 13, 2015 21:18
Show Gist options
  • Save marcbowes/4976522 to your computer and use it in GitHub Desktop.
Save marcbowes/4976522 to your computer and use it in GitHub Desktop.
Failing at ember-rails
git clone https://github.com/marcbowes/ember-hacking.git
bundle
rails s
open http://localhost:3000/
Nothing appears in the console and I get the following error in the console
DEBUG: ------------------------------- ember.js?body=1 (line 339)
DEBUG: Ember.VERSION : 1.0.0-rc.1 ember.js?body=1 (line 339)
DEBUG: Handlebars.VERSION : 1.0.0-rc.3 ember.js?body=1 (line 339)
DEBUG: jQuery.VERSION : 1.9.1 ember.js?body=1 (line 339)
DEBUG: ------------------------------- ember.js?body=1 (line 339)
TypeError: factory.create is not a function ember.js?body=1 (line 6298)
value = factory.create(hash);
@allansideas
Copy link

Hey, did you figure out what this was? I am getting the same error, and can't find any other people in the same boat :)

@DavertMik
Copy link

+1
wtf?

@ChrisCrazyP
Copy link

I cloned your repo but there was no error you described.
Whatever, i got the same error in a project and figured it out (exactly my coworker figured it out).

We did the mistake of using the method 'create' instead of 'extend' for creating a new View.
Maybe you did the same.

(Example:)

// Wrong:
// This will produce the TypeError
App.MyNewView = Ember.View.create({...});

// Correct:
App.MyNewView = Ember.View.extend({...});

Sometimes we need a coffee to fix it ;)

Hope it helps,

Greets ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment