Jump to content

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


incense

Recommended Posts

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

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...? :-)

Link to comment
Share on other sites

  • 2 weeks later...
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. :-)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...