+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 26

Thread: Rails: Error trying to install Typo

  1. #1
    Join Date
    Feb 2006
    Location
    Enschede, The Netherlands
    Posts
    13

    Default Rails: Error trying to install Typo

    Thumbs up for supporting Rails! Just tried to install Typo, but it seems that my setup isn't working properly. Here's what I did:
    1. Put Typo in /home/username/typo
    2. Created a symlink pointing /home/username/public_html/blog to /home/username/typo/public
    3. Chmodded /home/username/typo/log and /home/username/typo/public and everything in them to 777
    4. Configured /home/username/typo/config/database.yml and /home/username/typo/public/.htaccess (see below)
    5. Edited /home/username/typo/config/environment.rb to run in production mode

    But alas, pointing my browser at http://www.domain.tld/blog gives: "Application Error - Typo could not be reached"

    Here's my /home/username/typo/public/.htaccess:

    Code:
    # General Apache options
    AddHandler fastcgi-script .fcgi
    AddHandler cgi-script .cgi
    Options +FollowSymLinks +ExecCGI
    
    # Redirect all requests not available on the filesystem to Rails
    RewriteEngine On
    
    # Uncomment this if you're not running Typo in the root of your
    # webserver's URL space (i.e. http://www.example.com/blog):
    #
    RewriteBase /blog/
    
    # try to suggest current rss subscribers that the url moved permently
    RewriteRule ^xml/([a-z]+)$ /xml/$1/feed.xml [R=301]
    RewriteRule ^$ index.html [QSA]
    RewriteRule ^([^.]+)$ $1.html [QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
    
    # In case Rails experiences terminal errors
    ErrorDocument 500 "<h2>Application Error</h2>Typo could not be reached
    Tried dispatch.cgi too, but to no avail.

    Any help would be greatly appreciated!
    Last edited by roderickvd; 02-16-2006 at 07:24 AM.

  2. #2
    Join Date
    Feb 2006
    Location
    Enschede, The Netherlands
    Posts
    13

    Post Additional information

    I've been banging my head on this for too long now.

    Here's some additional debug information. Running in FastCGI, the error log displays:
    Code:
    [warn] FastCGI: (dynamic) server "/home/username/public_html/blog/dispatch.fcgi" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds
    Unfortunately, nothing gets logged to /home/username/typo/log.

    In CGI, it displays:
    Code:
    Premature end of script headers: /home/username/public_html/blog/dispatch.cgi
    I double-checked that UNIX linebreaks were preserved while uploading and all the dispatch.* files were chmodded 777. At a loss here!

  3. #3
    Join Date
    Feb 2006
    Location
    Metro DC, United States
    Posts
    100

    Default

    A preliminary question/suggestion, noting that I have minimal experience with Rails...

    Why did you immediately switch to 'production'? I would think there might possibly be better error messages under 'development', no?
    Eric
    ----
    "If you want to know what a man's like, take a good look at how he treats his inferiors, not his equals."
    ~Sirius Black, Harry Potter and the Goblet of Fire

  4. #4
    Join Date
    Feb 2006
    Location
    Enschede, The Netherlands
    Posts
    13

    Default

    You'd say so, but apparantely it doesn't really matter when Rails won't run in the first place (i.e. a HTTP 500 error code).

    So yes, I tried, but whatever I'm doing wrong must be occurring before Rails has the chance to log anything at all.

  5. #5
    Join Date
    Feb 2006
    Location
    Metro DC, United States
    Posts
    100

    Default

    Have you tried the Typo troubleshooting guide? I know you've covered some of the things in the list, but maybe not all of them.

    If I'm not helping, just tell me to go away...
    Eric
    ----
    "If you want to know what a man's like, take a good look at how he treats his inferiors, not his equals."
    ~Sirius Black, Harry Potter and the Goblet of Fire

  6. #6
    Join Date
    Feb 2006
    Location
    Enschede, The Netherlands
    Posts
    13

    Default

    Any help is highly appreciated.

    Unfortunately, there's not much else I can do... I don't have shell access, so I can't run the command by hand. However, I did double-check uploading so no Windows linefeeds would slip in, and I tried manually specifying the Ruby interpreter.

    I believe I've got all the rest covered.

  7. #7
    Join Date
    Feb 2006
    Location
    Metro DC, United States
    Posts
    100

    Default

    Ah, well the first thing I'd suggest is get shell access. I know with the security requirements Bluehost has in place it's a bit hard for some users. I wound up taking a picture of my license with my digital camera and emailing to support as I don't have access to a fax machine or scanner I can use for personal business.
    Eric
    ----
    "If you want to know what a man's like, take a good look at how he treats his inferiors, not his equals."
    ~Sirius Black, Harry Potter and the Goblet of Fire

  8. #8
    Join Date
    Feb 2006
    Posts
    11

    Default troubleshooting

    I'm a newbie so take this with a grain of salt but it seems to me that it would be useful to perform a test in order to distinguish between some fundamental problem with the ROR hosting on bluehost and some problem with typo itself or your upload of it.

    Suggest creating a blank rails app using

    rails railstest

    ln -s /home/username/railstest/public ~/public_html/railstest

    then at

    www.yourdomain.com/railstest/

    you should get a welcome page saying your riding the rails. I see that you don't have shell access yet so I made such a directory tree and left it for you at

    www.test2teach.com/railstest.zip

    I know that rails does some permission setting when it creates these files and directories so this may not work in which case I think you'll have to setup shell access.

    I'm just starting to dabble with ror and so far, my railstest works but when I try to copy the typo directories from my windows instant rails host (where they do work) to bluehost they do not work. In my case I get error messages about a bad path. Being new to rails I don't know how portable apps are supposed to be so I'm experimenting.

    Hope this helps...

  9. #9
    Join Date
    Feb 2006
    Posts
    11

    Default sample

    Interestingly, zipping the railstest dir and unzipping it over itself (or perhaps naming railstest.zip in public_html) has killed that ROR app. To see what the "welcome you're up and running" screen should look like, you can go to

    http://www.test2teach.com/todo/

  10. #10
    Join Date
    Feb 2006
    Location
    Enschede, The Netherlands
    Posts
    13

    Default

    Could you do a "ls -lR" in your sample RoR directory and post the results here?
    I can then compare my file permissions to what they ought to be.

+ Reply to Thread

Similar Threads

  1. What is the status of Ruby on Rails?
    By ben_brown30 in forum General Questions
    Replies: 11
    Last Post: 08-07-2006, 02:54 AM
  2. installing rails
    By JoeP in forum General Questions
    Replies: 13
    Last Post: 04-04-2006, 01:41 AM
  3. Setting up a Ruby on Rails application
    By cilphex in forum General Questions
    Replies: 10
    Last Post: 03-13-2006, 08:27 AM
  4. Ruby on Rails mysql support
    By bonz in forum General Questions
    Replies: 17
    Last Post: 03-06-2006, 12:37 PM
  5. Ruby on Rails Application error
    By leebot in forum General Questions
    Replies: 2
    Last Post: 02-15-2006, 12:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts