Welcome Guest | Login

A blank file downloads when accessing a controller..

I have managed to launch my rails cluster and the welcome to rails page comes up when i access my domain 6tackles.com.

However, I then sent my latest revision of my code to subversion and deployed it using capistrano but when I access the controller.. http://www.6tackles.com/splash - a file called splash downloads instead of showing the page.

I'm not sure what to search for as I'm not sure what its called, but how can I fix this, as it worked on my development machine.

Paul

2007-09-20 05:28 PM

Hello,

We are getting a routing error on accessing http://6tackles.com/ .

Can you please add the necessary entries in the "routes.rb" file in the config directory of the rails app.

2007-09-20 05:45 PM

Regards,
Rahul
Okay, I've added a route for the root of the site.. this is my route file..

ActionController::Routing::Routes.draw do |map|
map.connect ' ', :controller => "splash"
map.connect ':controller/:action/:id.:format'
map.connect ':controller/:action/:id'

I believe this is correct and that anybody accessing 6tackles.com will be taken to splash?

Paul

2007-09-20 08:09 PM

Hello,

I would like to tell you 2 things regarding the fix I have applied.

First thing the download page was avoided by modifying the .htaccess file in your main app public directory. I have commented the following entry
#AddHandler fastcgi-script .fcgi

and modified the line 32
RewriteRule ^(.*)$ dispatch.cgi [QSA,L] to RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

Also I could see that you are currently running the app in development mode. I have modified the database.yml file in the config directory of rails app to add entries for the development mode.

This lead to the route issue which you have fixed by adding the necessary route.

Now please do make the necessary changes in your app (environment.rb) to run it in production mode as we recommend this mode on our shared server.

2007-09-20 08:21 PM

Regards,
Rahul
Hi,

I'm glad you wrote what you did as I had already deployed again via capify and subversion had been updated. I've re-applied all of these though and it now works brilliantly, thank you.

I have removed the links to development mode in the database and have also set environment.rb to production mode (I thought I'd done this originally but it appears not).

Thanks guys, your technical support is fantastic.

2007-09-20 08:41 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.