Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8113311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:47:11+00:00 2026-06-06T02:47:11+00:00

Need help getting Ember-Data working with Zend Rest. At first, I’m familiar with Zend

  • 0

Need help getting Ember-Data working with Zend Rest.

At first, I’m familiar with Zend Framework, so the Rest Adapter was easy to setup. Requests by telnet show it works and response also has well-formed HTTP codes.

The setup with Ember Data was a little more complicated. I installed a VM with Ubuntu, installed Ruby 1.9.3, git cloneed the ember-data repository and generated the JS file with rake. I also installed the bundler to resolve all dependencies. Seems to work with no errors.
This was the first time for me. I’m not familiar with ruby.

Unfortuately, it does not appear to be working. On my test app I see with firebug the rest request. The response looks also good. But the object is still empty.

The response:

[{"id":"1","user":"testuser","password":"123","mail":"my@me.com","role":"GUEST","active":"1","hash":null,"last_login":null}]

response headers:

Cache-Control       no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection          Keep-Alive
Content-Encoding    gzip
Content-Length      121
Content-Type        application/json; charset=utf-8
Date                Wed, 20 Jun 2012 10:49:38 GMT
Expires             Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive          timeout=15, max=99
Pragma              no-cache
Server              Apache
Vary                Accept-Encoding
X-Powered-By        PHP/5.3.13
X-UA-Compatible     IE=Edge,chrome=1

My App:

    // my script
    App = Em.Application.create();

    App.store = DS.Store.create({
      revision: 4,
      adapter: DS.RESTAdapter.create({ bulkCommit: false, namespace: 'rest' })
    });

    App.User = DS.Model.extend({
        id: DS.attr('number'),
        user: DS.attr('string'),
        password: DS.attr('string'),
        mail: DS.attr('string'),
        role: DS.attr('string'),
        active: DS.attr('number'),
        hash: DS.attr('string'),
        last_login: DS.attr('date')
    });

    App.postsController = Em.ArrayController.create({
        content: App.store.findAll(App.User)
    });


    // my html page
    <script type="text/x-handlebars">
        {{#each App.postsController}}
           <li>{{user}}</li>
        {{/each}}
    </script>

What am I doing wrong? I’m not sure my ember-data.js is working.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:47:13+00:00Added an answer on June 6, 2026 at 2:47 am

    https://github.com/emberjs/data/issues/132

    DS.RESTAdapter requires a root element. Such as:

    {
      users: [{
        "id":"1",
        "user":"test user",
        "password":"123",
        "mail":"my@me.com",
        "role":"GUEST",
        "active":"1",
        "hash":null,
        "last_login":null
      }]
    }
    

    This is because DS.RESTAdapter supports side loading. Unfortunately, it is not configurable. The only way around this requirement is to roll your own adapter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need help getting CommonJS working on Java 7 and Rhino 1.7R3. Rhino 1.7R3
I need help getting two pieces of data, and comparing them. What I am
I need help getting setup on Seam 3 modules. When I try to use
I'll try this again. I need help in getting a third option working using
I need some help getting data from several tables. This is the tables I
Need a little help getting the following rule working: RewriteCond %{HTTP_HOST} ^asset.*.domainone\.com [NC,AND] RewriteCond
I use python to create my project settings setup, but I need help getting
Hi need help getting repeated value from give array,below is the code which im
I need help getting VIM to correctly indent javascript inside script tags. This is
I need help getting git extensions to run with msysgit. I have had bad

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.