Results 1 to 12 of 12
  1. #1

    Arrow Ruby on Rails: dispatch.fcgi was not found on this server

    I'm deploying a Ruby on Rails application for the first time on shared hosting and I am having some difficulty. I have uploaded my rails application to ~/rails_apps/myapp and set the following permissions in the apps directory:

    log 766 (tried 666 but then I couldn't open the directory to read the logs)
    tmp 766
    public 755
    public/dispatch.cgi 755
    public/dispatch.fcgi 755
    public/dispatch.rb 755


    these files remain with the original permissions
    public/.htaccess 644
    public/index.html 644


    I have updated the dispatch.* files shebang (firstline) to the following:
    #!/usr/local/bin/ruby


    my .htaccess file is as follows (comments omitted):

    Code:
    AddHandler fastcgi-script .fcgi
    AddHandler cgi-script .cgi
    Options +FollowSymLinks +ExecCGI
    
    RewriteEngine On
    
    RewriteRule ^$ index.html [QSA]
    RewriteRule ^([^.]+)$ $1.html [QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
    
    ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
    and finally, I created a symbolic link from ~/public_html/myapp to ~/rails_apps/myapp/public

    Now, when I try to load http://www.my.site/myapp I get this:

    Not Found
    The requested URL /home/MYUSERNAME/public_html/myapp/index.html was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/1.3.37 Server at 87.117.234.234 Port 80


    and if I try to load a controller called test in my rails app (http://www.my.site/myapp/test) I get this:

    Not Found
    The requested URL /home/MYUSERNAME/public_html/myapp/dispatch.fcgi was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/1.3.37 Server at 87.117.234.234 Port 80



    I'm out of ideas, does anyone else know what else I need to update?

  2. #2

    Thumbs up Possible breakthrough =D

    Well, I'm back from a weekend trip and I thought I'd load up the page just to remind myself of where I'd got to with this. Lo and behold! it worked!

    I loaded up the app (http://www.my.site/myapp) and got the blank rails welcome page. I tried the controller (http://www.my.site/myapp/test) and it outputted some text saying "this is a test" (which is what I told it to do), so all seems well. I'm going to try doing something that actually accesses a database next, I'll post here afterwards.

    I'm guessing the delay in this working is due to the FastCGI process needing to restart (??)

    Well, for now if you're trying to deploy a rails app, follow my instructions above, give FastCGI some time to restart (or pester support ) and post your results here!

  3. #3

    Cool All systems are go

    tried a more complex test using some databases, all working fine! for anyone trying to deploy their first rails app on eukhost take note of my steps above...

    dont forget when using databases on eukhost that your account name gets added to the start of your database name and underscores are removed. eg:

    "myapp_development" becomes "username_myappdevelopment"

    so remember to update your config/database.yml to include the new database names (once you've set them up using SSH or cpanel) and change the username from root (or whatever you develop with locally) to your eukhost username you have set up on mysql. I know I've just whizzed over some steps there, but I found it pretty simple from here on in and I expect you will do too

  4. Default

    Great work caolan, I'll take a look at this at some point as I failed misserably to get my own test rails app working!

  5. #5
    Join Date
    Sep 2005
    Posts
    6,043

    Default

    cPanel has included support for Ruby on Rails in version 11. We have version 11 on all our servers and the number of Gems they have started supporting seems to show their awareness of success coming in direction of Ruby. take a look in your cpanel and install the gems you need.
    UK Web Hosting || Business Hosting || eUKhost Knowledgebase
    Toll Free : 0808 262 0255 || Skype : mark_ducadi
    A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
    __________________________________________________

    Please email cmo[at]eukhost.com if you have any questions or need my assistance

  6. #6
    Join Date
    Jan 2007
    Location
    Amersham
    Posts
    511

    Default Where in cpanel

    Where in cpanel 11 is the ruby on rails stuff - I can't find any mention of ruby, rails or gems
    David Allen - www.serina.co.uk

  7. #7
    Join Date
    Apr 2007
    Location
    Manchester, United Kingdom
    Posts
    8,440

    Default

    Quote Originally Posted by DavidAllen View Post
    Where in cpanel 11 is the ruby on rails stuff - I can't find any mention of ruby, rails or gems
    It should be in the "Site Software" section next to Fantastico.

    I contacted support to have it added to my cPanel but I was informed that it was not available on my shared server however they would be able to transfer my account onto a shared server that did have it installed if I make the request.

    Mark, have things recently changed then as 2 days ago support in LiveChat said it was not available on my shared server?
    David Smith
    DPS Computing
    http://www.dpscomputing.com (Computing, Reviews, News) - We're still plodding on adding new content and features (August 2011)
    http://www.djdavid.co.uk - Massive update! (September 2011) - It's now not neglected!!
    http://davidsmith.dpscomputing.com (My Personal Website) - New Site (10/2009)

  8. #8
    Join Date
    Sep 2005
    Posts
    6,043

    Default

    Quote Originally Posted by DPS Computing View Post
    It should be in the "Site Software" section next to Fantastico.

    I contacted support to have it added to my cPanel but I was informed that it was not available on my shared server however they would be able to transfer my account onto a shared server that did have it installed if I make the request.

    Mark, have things recently changed then as 2 days ago support in LiveChat said it was not available on my shared server?
    things didn't change recently but nothing has changed from the day your dedicated server has been online. message me tomorrow and I will take care of moving your website hosting on your dedicated server. I am not sure if you got in touch with our support team to get the website hosting migrated on your dedicated server but this time I'll do it for you.
    UK Web Hosting || Business Hosting || eUKhost Knowledgebase
    Toll Free : 0808 262 0255 || Skype : mark_ducadi
    A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
    __________________________________________________

    Please email cmo[at]eukhost.com if you have any questions or need my assistance

  9. #9
    Join Date
    Apr 2007
    Location
    Manchester, United Kingdom
    Posts
    8,440

    Default

    Yes did contact support and they sorted it .
    David Smith
    DPS Computing
    http://www.dpscomputing.com (Computing, Reviews, News) - We're still plodding on adding new content and features (August 2011)
    http://www.djdavid.co.uk - Massive update! (September 2011) - It's now not neglected!!
    http://davidsmith.dpscomputing.com (My Personal Website) - New Site (10/2009)

  10. #10
    Join Date
    Sep 2005
    Posts
    6,043

    Default

    Quote Originally Posted by DPS Computing View Post
    Yes did contact support and they sorted it .
    Thanks buddy

    You seem to be very understanding. I thought you will make me migrate it for you
    UK Web Hosting || Business Hosting || eUKhost Knowledgebase
    Toll Free : 0808 262 0255 || Skype : mark_ducadi
    A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
    __________________________________________________

    Please email cmo[at]eukhost.com if you have any questions or need my assistance

  11. #11
    Join Date
    Apr 2007
    Location
    Manchester, United Kingdom
    Posts
    8,440

    Default

    Quote Originally Posted by eukhost.com View Post
    Thanks buddy

    You seem to be very understanding. I thought you will make me migrate it for you
    No problem. Oh yes, I am always understanding, especially where eUKhost are concerned as I get great support, a great service and it is run by great people!

    I have all the time in the world for people like you and the eUKhost team as you do the same for me.

    I wouldn't want to add more work to your load - I'm sure you've probably got a lot on your plate today! (like every other day!)
    David Smith
    DPS Computing
    http://www.dpscomputing.com (Computing, Reviews, News) - We're still plodding on adding new content and features (August 2011)
    http://www.djdavid.co.uk - Massive update! (September 2011) - It's now not neglected!!
    http://davidsmith.dpscomputing.com (My Personal Website) - New Site (10/2009)

  12. #12

    Default The requested URL /dispatch.fcgi was not found on this server

    Its seems that you guys have a great knowledge on installing redmine. Please help me

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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