Heroku "We're sorry, but something went wrong." due to javascript_include_tag

Posted by Newton on Stack Overflow See other posts from Stack Overflow or by Newton
Published on 2012-04-08T23:19:12Z Indexed on 2012/04/08 23:30 UTC
Read the original article Hit count: 200

Uploading my ruby on rails app to heroku causes the following error:

We're sorry, but something went wrong.

This does not occur on my local machine.

After some debugging, I think I may have spotted the error, but do not know how to fix it.

In my file application.html.erb, removing the following line solves the problem, but then my app loses its jquery mobile theme. Any ideas what I could do to fix the problem?

Line causing the problem:

<%= javascript_include_tag "application" %>

application.html.erb file:

<!DOCTYPE html>
<html>
<head>
  <title>Washapp</title>
  <meta name="viewport" content="width=device-width">
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
  <%= javascript_include_tag "application" %>

  <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
  <%= csrf_meta_tags %>

  <script>
    if (window.location.hash == "#_=_")
        window.location.hash = "";
  </script>

</head>
<body>
  <div data-role="page">
    <%= yield %>
  </div>
</body>
</html>

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about ruby-on-rails