I have a Backbone (1.1.0) on Rails (4.1.0) app using RequireJS (requirejs-rails gem) that works fine on my local machine. But when I precompile assets and run the server, the app, having been compiled/compressed by r.js, does not start. No errors are thrown anywhere. Here are some snippets:
18:57 $ RAILS_ENV=production rails server
=> Booting WEBrick
=> Rails 4.1.0 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
[2014-05-06 19:04:01] INFO WEBrick 1.3.1
[2014-05-06 19:04:01] INFO ruby 2.1.1 (2014-02-24) [x86_64-darwin12.0]
[2014-05-06 19:04:01] INFO WEBrick::HTTPServer#start: pid=60796 port=3000
Started GET "/" for 127.0.0.1 at 2014-05-06 19:04:03 -0500
Processing by MainController#index as HTML
Rendered main/index.html.erb within layouts/application (1.4ms)
Completed 200 OK in 16ms (Views: 13.3ms | ActiveRecord: 0.0ms)
and just to clear up any confusion, here's the html that loads:
I have a Backbone (1.1.0) on Rails (4.1.0) app using RequireJS (requirejs-rails gem) that works fine on my local machine. But when I precompile assets and run the server, the app, having been compiled/compressed by r.js, does not start. No errors are thrown anywhere. Here are some snippets:
requirejs.yml
application.js
application.html.erb
Here's my Heroku Logs (don't mind the gaps):
and just to clear up any confusion, here's the html that loads:
I am guessing that the mistake is in either how I initialize my app in application.js or in the config in requirejs.yml, but I just can't solve it.
I also asked this on StackOverflow here