Question

I am using Ruby on Rails with Helicon Zoo on Windows Server 2008 R2. This webapp connects to a Windows SQL Server 2008 database that is on a different server in the same domain.

When I try to connect to our SQL Server in production mode (web.config is set to production) I am getting this error in the web browser:

"We're sorry, but something went wrong."

When I set the mode to development and connect everything works just fine.

The settings for my development and production databases are setup exactly the same in database.yml. They are going to the same database on the same server with the same user and password. (I have it set this way to test since it didn't work on our production sql server)

Is there anything else I need to do to setup production mode for Rails when using Helicon Zoo?

Here is the full error from ZooError.log:

[9/25/2012 08:39:33]    MakeFirstRequest - Exception 
[9/25/2012 08:39:33]    NamedPipeConnection::Read error!
[9/25/2012 08:39:44]    ZooApplication I/O Error:
JobFastCgi:[/] _requestId:1, BACKEND_READ_COMPLETE, POST_MODE_PARTIAL

[9/25/2012 08:41:28]    Status: 500 Internal Server Error

Content-Type: text/html; charset=utf-8

Content-Length: 643

X-Request-Id: a86305bf7e5530a0852e85b8ba4876c2

X-Runtime: 0.281257

Date: Tue, 25 Sep 2012 13:41:28 GMT

X-Rack-Cache: miss



<!DOCTYPE html>
<html>
<head>
  <title>We're sorry, but something went wrong (500)</title>
  <style type="text/css">
    body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
    div.dialog {
      width: 25em;
      padding: 0 4em;
      margin: 4em auto 0 auto;
      border: 1px solid #ccc;
      border-right-color: #999;
      border-bottom-color: #999;
    }
    h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
  </style>
</head>

<body>
  <!-- This file lives in public/500.html -->
  <div class="dialog">
    <h1>We're sorry, but something went wrong.</h1>
  </div>
</body>
</html>

[9/25/2012 08:41:28]    FCGI_END_REQUEST
Était-ce utile?

La solution

The problem wasn't with Helicon Zoo.

When I re-examined the log/production.log file I noticed that I was getting an error like this:

ActionView::Template::Error (application.css isn't precompiled):

So I did some searching on Stackoverflow and found this question:

rails 3.1.0 ActionView::Template::Error (application.css isn't precompiled)

Following the advise of Chris Muench, I changed config.assets.compile which is located at config/environments/production.rb to true.

After this change everything worked great.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top