Ember not loading JSON on production

Hi

i am using Ember for a small application. On development mode everything works ! but when i run the (rails) app on production mode … the Ember app does not loading data anymore !

open up the inspector in the browser and check for any errors, especially the network tab.

I checked at console ! there is no error but in Network tab i see no activity when i visit routes :frowning:

I had to set this to true in config/environments/production.rb

  config.serve_static_assets = true

is there a better way to serve Ember apps backed by Rails ?

If you want to keep your ember code in your rails app and asset pipeline, you could precompile your assets when deploying your application and serve static assets through a web server like nginx or apache.

i’ve done that before ! but when i deploy a new version of my app, after precompiling assets and restarting my nginx server ( using passenger ) … the Ember app takes minutes to load firt time

if you had to enable config.serve_static_assets = true in production, than something isn’t getting precompiled and it is compiling it on the fly. You probably could tail your rails logs to see what’s going on?

not sure if this is the best place to troubleshoot rails asset issues, maybe on freenode #rubyonrails?

i have to Ember apps backed by Rails ! i had to enable config.serve_static_assets = true on the second one ! the first one is served bu nginx and static files and also served by nginx !