Blank White Page

Repository of web frameworks and applications for Microsoft IIS.
User avatar
Posts: 9
Joined: 30 Mar 2012, 11:39

Blank White Page

30 Mar 2012, 12:28

I have installed the Ruby Hosting Package, Ruby 1.9 Dev kit, Ruby 1.9, Rails 3. The static index.html page in the public folder of my Rails application renders fine. That file even pulls images from inside of rails engines in my application. However, when I try to hit a controller method, the page renders as a blank white page. If I check the rails log file I see that the method succeeds. If I check the helicon log I see no errors either. So it appears as though helicon is handling ruby requests just fine but that IIS is not outputting the result. Any help is appreciated. I will post the web.config and log files below.

blank page source:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><META content="IE=9.0000" http-equiv="X-UA-Compatible">

<META content="text/html; charset=utf-8" http-equiv="Content-Type"></HEAD>
<BODY></BODY></HTML>

rails.project.x64 worker-0.log:
C:/Users/Administrator/compass_ae/vendor/gems/ruby/1.9.1/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:240:in `block in require': iconv will be deprecated in the future, use String#encode instead.

rails production.log:
Started GET "/erp_app/login" for 127.0.0.1 at 2012-03-30 11:25:19 -0400
Processing by ErpApp::LoginController#index as HTML
Rendered vendor/gems/ruby/1.9.1/bundler/gems/compass_agile_enterprise-27489ced1d95/erp_app/app/views/erp_app/login/index.erb (173.0ms)
Completed 200 OK in 730ms (Views: 730.3ms | ActiveRecord: 0.0ms)

web.config in app root:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<heliconZoo>
<application name="rails.project.x64">
<environmentVariables>
<add name="DEPLOY_LOG" value="log\zoo-deploy.log" />-->
<add name="RACK_ENV" value="production" />
<add name="ERROR_LOG_DIR" value="log" />
<add name="WORKER_REQUEST_TIMEOUT" value="1000" />
</environmentVariables>
</application>
</heliconZoo>

<handlers accessPolicy="Read, Execute, Script">
<add name="rails.project.x64" scriptProcessor="ruby.1.9.pipe" path="*" verb="*" modules="HeliconZoo_x64" preCondition="bitness64" resourceType="Unspecified" requireAccess="Script" />
</handlers>

<!-- Send static files through IIS -->
<rewrite>
<rules>
<rule name="Rewrite to Zoo index if that's an empty application" stopProcessing="true">
<match url=".?" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true">
<add input="{APPL_PHYSICAL_PATH}" pattern="(.*)" ignoreCase="false" />
<add input="{C:1}config\environment.rb" matchType="IsFile" negate="true" />
</conditions>

<action type="Rewrite" url="public\zoo-index.html" />
</rule>

<rule name="index" stopProcessing="true">
<match url="^$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true">
<add input="{APPL_PHYSICAL_PATH}" pattern="(.*)" ignoreCase="false" />
<add input="{C:1}public\index.html" matchType="IsFile" />
</conditions>
<action type="Rewrite" url="public/index.html" />
</rule>

<rule name="Static Files" stopProcessing="true">
<match url="^(?!public)(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true">
<add input="{APPL_PHYSICAL_PATH}" pattern="(.*)" ignoreCase="false" />
<add input="{C:1}public\{R:1}" matchType="IsFile" />
</conditions>
<action type="Rewrite" url="public/{R:1}" />
</rule>

<rule name="Rails 3.1 assets" stopProcessing="true">
<match url="^assets/(.*)$" ignoreCase="true" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true">
<add input="{APPL_PHYSICAL_PATH}" pattern="(.*)" ignoreCase="false" />
<add input="{C:1}app\assets\{R:1}" matchType="IsFile" />
</conditions>
<action type="Rewrite" url="app/assets/{R:1}" />
</rule>
</rules>
</rewrite>

</system.webServer>
</configuration>

web.config in public folder:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="rails.project.x64" />
</handlers>
</system.webServer>
</configuration>

User avatar
Posts: 27
Joined: 06 Mar 2012, 11:59

Re: Blank White Page

30 Mar 2012, 12:38

Hello.
Please check what status code and response headers you get from IIS. Please also provide the output of that controller as it must be.
Thank you.

User avatar
Posts: 9
Joined: 30 Mar 2012, 11:39

Re: Blank White Page

30 Mar 2012, 12:57

Response Status: 200 OK
Response Headers:
Cache-Control no-cache, private
Content-Length 0
Content-Type text/html; charset=utf-8
Date Fri, 30 Mar 2012 15:56:09 GMT
Server Microsoft-IIS/7.5
Set-Cookie _BlankRailsProject_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTBiMDYxNTc1OTE3MDMxOGM5M2RkM2Y5ODFkZWM2YTZjBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMWRKM1VSOFB2cmFZenY2NzAwQmpkUDNPSFFsOTAzbmM1enBuMDkzQVpTZ2c9BjsARg%3D%3D--2ea2f38899a563abef5bea4596a27e3fcc9ccb0c; path=/; HttpOnly
X-Powered-By ASP.NET
X-Rack-Cache miss
X-Runtime 0.005864
X-Sendfile </html>
X-UA-Compatible IE=Edge,chrome=1

User avatar
Posts: 9
Joined: 30 Mar 2012, 11:39

Re: Blank White Page

30 Mar 2012, 12:58

Output as it should be:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Compass AE Login</title>

<script type="text/javascript" src="/javascripts/extjs/ext-all-debug.js"></script><script type="text/javascript" src="/javascripts/extjs/ext_ux_tab_close_menu.js"></script><script type="text/javascript" src="/javascripts/extjs/Ext.ux.form.MultiSelect.js"></script><link rel="stylesheet" type="text/css" href="/stylesheets/extjs/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="/stylesheets/erp_app/shared/compass-ext-all.css" /><link rel="stylesheet" type="text/css" href="/stylesheets/erp_app/login/main.css" />
<script type="text/javascript" src="/javascripts/erp_app/utility.js"></script><script type="text/javascript" src="/javascripts/erp_app/login/window.js"></script>
<script type='text/javascript'>Ext.Ajax.extraParams = { authenticity_token: 'ZHkBW8EohNzYZUraFuHpJL0tKUuiw5qsjLb3t+oT76w=' }; Compass.ErpApp.AuthentictyToken = 'ZHkBW8EohNzYZUraFuHpJL0tKUuiw5qsjLb3t+oT76w=';</script>
</head>
<body style="background-color:#336699;">
<div style="text-align:center;width:100%; padding-top: 5%;">
<img alt="Compass Agile Enterprise" src="/images/art/truenorth-compass-combined-timeshare-navy-5.png" />
</div>
<script type="text/javascript">
Ext.onReady(function(){
var appContainers = [['/erp_app/desktop/','Compass Desktop'],['/erp_app/organizer/','Compass Organizer']];
var loginWindow = new Compass.ErpApp.Login.Window({appContainers:appContainers, selectedAppContainerValue:'/erp_app/desktop/',redirectTo:'/erp_app/desktop/', logoutTo:'/erp_app/login', message:'', authenticity_token:'ZHkBW8EohNzYZUraFuHpJL0tKUuiw5qsjLb3t+oT76w='});
loginWindow.show();
});
</script>
</body>
</html>

User avatar
Posts: 27
Joined: 06 Mar 2012, 11:59

Re: Blank White Page

02 Apr 2012, 05:32

Hi.
Please try and set RACK_ENV variable to “development” in the web.config file: <add name="RACK_ENV" value="development" />
Let’s see if it makes a difference.
It would be nice to have your application, or the relevant part of it, so that I could test. If that’s possible, please send it to [email protected]
Thank you.

User avatar
Posts: 9
Joined: 30 Mar 2012, 11:39

Re: Blank White Page

02 Apr 2012, 09:58

In development mode the rails log says the page renders but i see this error in the x64 worker log:
127.0.0.1 - [02/Apr/2012 08:47:25] "GET /erp_app/login HTTP/1.1" 200 - 2.7070
[tid-3165588] The file identified by body.to_path does not exist (Rack::Lint::LintError)
C:/Users/Administrator/compass_ae/vendor/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/lint.rb:19:in `assert'
C:/Users/Administrator/compass_ae/vendor/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/lint.rb:543:in `each'
C:/Users/Administrator/compass_ae/vendor/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/body_proxy.rb:23:in `method_missing'
C:/Zoo/Workers/ruby/lib/request.rb:82:in `send_body'
C:/Zoo/Workers/ruby/lib/request.rb:58:in `serve'
C:/Zoo/Workers/ruby/lib/worker.rb:42:in `handle_request'
C:/Zoo/Workers/ruby/lib/worker.rb:36:in `process'
C:/Zoo/Workers/ruby/lib/worker.rb:20:in `block in run'
C:/Zoo/Workers/ruby/lib/worker.rb:20:in `loop'
C:/Zoo/Workers/ruby/lib/worker.rb:20:in `run'
C:/Zoo/Workers/ruby/zack.rb:30:in `<module:Zack>'
C:/Zoo/Workers/ruby/zack.rb:12:in `<main>'

User avatar
Posts: 9
Joined: 30 Mar 2012, 11:39

Re: Blank White Page

02 Apr 2012, 10:05

I am trying to run Compass AE which is open source: https://github.com/portablemind/compass ... enterprise
FYI, I am using IIS 7.5

To install Compass AE, try this:
gem install compass_ae
compass_ae new [your apps name]

Then I recommend modifying your Gemfile
I am running from github master at the moment as the gems on rubygems are old:
git "https://github.com/portablemind/compass_agile_enterprise.git" do
gem "erp_base_erp_svcs"
gem "erp_tech_svcs"
gem "erp_app"
gem "erp_forms"
gem 'knitkit'
gem 'rails_db_admin'
gem 'compass_ae_console'
end

Then:
bundle update
rake db:migrate
rake db:migrate_data

(using sqlite at the moment to test helicon)

User avatar
Posts: 27
Joined: 06 Mar 2012, 11:59

Re: Blank White Page

02 Apr 2012, 12:33

Could you please package the application and send it to us or put on github. I followed all steps you’ve provided and used your web.config files but couldn’t reproduce the issue.

User avatar
Posts: 9
Joined: 30 Mar 2012, 11:39

Re: Blank White Page

02 Apr 2012, 13:18

So you are successfully seeing the login page when you hit /erp_app/login?
I zipped up the app but it is 300meg. I think it put all the gems and cloned the repo into vendor/.
I am going to strip that out and try and zip again. Hopefully it will be small enough to email.

User avatar
Posts: 9
Joined: 30 Mar 2012, 11:39

Re: Blank White Page

02 Apr 2012, 13:36

Code emailed.
Thanks for your help.

User avatar
Posts: 9
Joined: 30 Mar 2012, 11:39

Re: Blank White Page

05 Apr 2012, 12:53

Just want to post that I got this working by recreating the website in IIS using the basic Add Website feature. It appears as though the "Blank Rails Project" somehow was interfering with the application to cause the contents of the page to be sent in the header of the response. Very strange.

Return to Helicon Zoo

Who is online

Users browsing this forum: No registered users and 6 guests