spine / spine-rails

Spine plugin for Rails
171 stars 38 forks source link

Uncaught TypeError: Cannot read property 'prototype' of undefined #12

Closed dnagir closed 13 years ago

dnagir commented 13 years ago

When using scaffold generator: rails g spine:scaffold User name email and the opening the page the error is thrown.

Uncaught TypeError: Cannot read property 'prototype' of undefined
__extends users.js:6
(anonymous function) users.js:132
(anonymous function) users.js:150
(anonymous function) users.js:151

The line where it throws is:

App.Users = (function() {
    __extends(Users, Spine.Stack); // HERE!!!!!!!!!! It throws, trying to extend using CoffeeScript generated helper
    function Users() {
      Users.__super__.constructor.apply(this, arguments);
    }
    Users.prototype.controllers = {
      index: Index,
      edit: Edit,
      show: Show,
      "new": New
    };
    Users.prototype.routes = {
      '/users/new': 'new',
      '/users/:id/edit': 'edit',
      '/users/:id': 'show',
      '/users': 'index'
    };
    Users.prototype["default"] = 'index';
    return Users;
  })();
dnagir commented 13 years ago

The reason seems to be that Spine.Stack is undefined.

maccman commented 13 years ago

Yes, Spine has been updated now - all fixed.

dnagir commented 13 years ago

But we need to take those Spine files and serve here. Otherwise the issue will still appear.

I am kind of burned today, can you do that?

maccman commented 13 years ago

They are already in the repo - run bundle update.