Jump to content

Rails app: running, but only mainpage, no subpages, images, CSS...


Recommended Posts

Posted

Hey everybody

 

First of all: Thanks a lot to the people running HelioHost! It's really a great thing, and I'm very thankful for this.

 

I'd like to host a small Rails app on HelioHost. I managed to get it correctly connecting to the database etc., and the main page seems to work already to some extent:

 

http://incense.heliohost.org/bergschmuck

 

To compare, here is the "original" page on my old hosting (who will cancel RoR support in a few weeks, sadly):

 

http://www.bergschmuck.ch

 

So the problem seems to be some .htaccess thing, I guess? I tried some things in the public/.htaccess file myself, but it didn't work out - in fact, when deleting all its contents, this didn't have any impact, too, so it seems there's something wrong somewhere else...!?

 

Anyone has an idea? :-)

 

Thanks a lot for help, and also thanks again for this great service!

Josh

Posted

I took a look at the HTML code of the output. Here's a snippet.

 

<link href="/stylesheets/forms.css?1169334000" media="screen" rel="Stylesheet" type="text/css" />

 

Notice that the address to the stylesheet is incorrect. It should be:

 

<link href="/bergschmuck/stylesheets/forms.css?1169334000" media="screen" rel="Stylesheet" type="text/css" />

 

OR

 

<link href="stylesheets/forms.css?1169334000" media="screen" rel="Stylesheet" type="text/css" />

 

The current stylesheet URL is http://incense.heliohost.org/stylesheets/f....css?1169334000 , which should be http://incense.heliohost.org/bergschmuck/s....css?1169334000 . See the difference?

 

Moving to Website Management and Coding forum, as this topic has nothing to do with the hosting experience we provide but a coding mistake. ;)

 

Hope this helped. :)

Posted

Adding that as a parked or subdomain will solve that problem with the least effort.

Posted

I added a subdomain, and this didn't work. And now even the old link doesn't work anymore! I don't know why. I restarted the Rails app, the production.log tells only

 

"# Logfile created on Thu Feb 24 08:59:42 -0800 2011 by logger.rb/22285"

 

and doesn't get altered in any way when accessing the app, so I guess somehow my old link (that worked) now doesn't point to my app anymore. But the rails app is running, the needed rewrite still points to the correct port... no idea what's not ok there.

 

Anyone has an idea? Anyone got Rails working? :-) Thanks a lot.

Posted
Stevie was down an hour ago - all sites were taken offline. ;)

 

I'm seeing http://incense.heliohost.org/bergschmuck fine now. Could you post the URL to your subdomain?

 

Better now. But still not perfect.

 

I have created a subdomain http://bergschmuck.incense.heliohost.org which points to /rails_apps/bergschmuck/public. This doesn't work. So I created another subdomain http://bergschmuck2.incense.heliohost.org that points to /rails_apps/bergschmuck, which redirects me to http://bergschmuck2.incense.heliohost.org/...aultwebpage.cgi and tells me "HelioHost Account Queued". Still not what I want. ;-)

 

Any suggestions? Thanks.

Posted
It takes 24 hours for subdomains to become active. ;)

 

Oh, I see. In this case I suggest you edit the "HelioHost Account Queued" message with something more accurate. :-)

Posted

OK, it's still getting better, but it's not superb yet. ;-)

 

bergschmuck.incense.ch (goes to the root/public dir of the rails app)

bergschmuck2.incense.ch (goes to the root dir of the rails app)

 

It seems that the correct dispatcher thingie is loaded, but it's just displayed to screen instead of being executed...? :-)

  • 2 weeks later...
Posted
It seems that the correct dispatcher thingie is loaded, but it's just displayed to screen instead of being executed...? :-)

Nobody has an idea?

 

http://bergschmuck.incense.heliohost.org/

 

This displays the following:

 

#!/usr/local/bin/ruby
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
# and the GC period is nil (turned off).  A reasonable number of requests
# could range from 10-100 depending on the memory footprint of your app.
#
# Example:
#   # Default log path, normal GC behavior.
#   RailsFCGIHandler.process!
#
#   # Default log path, 50 requests between GC.
#   RailsFCGIHandler.process! nil, 50
#
#   # Custom log path, normal GC behavior.
#   RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
#
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'

RailsFCGIHandler.process!

 

Instead it should fire up Ruby and execute the file...

 

I'd be *very* thankful for help. :-)

Guest Geoff
Posted

What is the extension of the file that code is in?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...