Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Ruby on Rails

  1. #11
    Junior Member Newbie
    Join Date
    Sep 2006
    Posts
    1

    Default

    Hi, This post is very informative, however I would like some specific information. If someone can help me then please send me a private message. Best Regards,

  2. #12
    Junior Member Newbie
    Join Date
    Oct 2006
    Posts
    8

    Default can't get RoR to work... :-(

    I have followed the instructions you listed in the post with two exceptions:

    1. I did ruby 1.8.4 instead of 1.8.3.
    2. I did rubygems 0.9.0 instead of 0.8.11

    The rest of the directions were verbatim.

    Yet, when I try to go to http://www.computer-recon.com/rails I get the following:

    Bad Request
    Your browser sent a request that this server could not understand.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


    I have been hitting my head on this problem for a couple days now. It's not using FastCGI as yet NO ONE has been able to figure out why it won't load and run on either of the two cPanel servers that I have (one with Spry and one with another company). Yet regular CGI doesn't seem to be working either.

    Does anyone have any ideas?

  3. #13
    robn@spry
    Guest

    Cool

    Quote Originally Posted by Andrew Christensen
    I have followed the instructions you listed in the post with two exceptions:

    1. I did ruby 1.8.4 instead of 1.8.3.
    2. I did rubygems 0.9.0 instead of 0.8.11

    The rest of the directions were verbatim.

    Yet, when I try to go to http://www.computer-recon.com/rails I get the following:

    Bad Request
    Your browser sent a request that this server could not understand.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


    I have been hitting my head on this problem for a couple days now. It's not using FastCGI as yet NO ONE has been able to figure out why it won't load and run on either of the two cPanel servers that I have (one with Spry and one with another company). Yet regular CGI doesn't seem to be working either.

    Does anyone have any ideas?
    Hey Andrew,

    When I go to just the straight URL http://www.computer-recon.com/rails I get the 404 you are talking about; but, when I go to http://www.computer-recon.com/rails/index.php I get:

    Application error

    Rails application failed to start properly"

    That tells me that perhaps some other things are not setup completely.

  4. #14
    Junior Member Newbie
    Join Date
    Oct 2006
    Posts
    8

    Default

    That's really weird. There's no index.php file in that rails location. Maybe you don't quite get the way RoR works but in the public folder that the rails symlink points to does not have and should not have an index file at all. The .htaccess is supposed to point all traffic through the configuration in the routes.rb file. This file determines what controller/view is going to be the default to display. The most optimal setup is to have the Ruby files run through FastCGI. The problem is that cPanel has some inherent issues with getting FastCGI running. You can download and install it 3 million times and never get running. There is some setting somewhere that I just don't know of. I keep seeing people put up basically the same tutorial on getting it running on cPanel, but so far as yet have not been able to get it working. I was kind of counting on you guys as the server support people to be able to track down this issue and solve it. We aren't server admins. We have basic understanding of how to operate our servers and have chosen to host with you under the belief that you can provide this support. Please let me know if you can find out the following:

    1. Why FastCGI will not start when the LoadModule for FastCGI is added to the httpd.conf file and Apache is restarted.

    2. Why the basic operation of CGI will not work either. Following your instructions, I did a basic build of a rails app, which SHOULD work as a default with CGI.

    I need to get this running right away. I have come to an understanding from other sources that cPanel is finishing up some kind of module or something that can be installed that will enable Ruby on Rails applications automatically, but they are still a week or two out. I need this sooner.

    Thanks for your help. By the way, do you guys have an AIM/MSN/Yahoo account that I can contact you guys with so that I don't have to get on the phone and disturb everyone around me when I need help?

    UPDATE: I went into the /home/xxxxx/support directory where the default rails installation is and added a controller and model called home. I changed the routes.rb file to reflect this change. I then also edited the database.yml file to put in the appropriate information. I then checked the public folder and found an index.html file. If I go to http://www.computer-recon.com/rails/index.html then the file displays. If you click on the link "About your application's environment", you will see the message that something isn't working. This tells me that CGI is not working.

    Something on the server is not set up to default to index.html and it seems as though it's ignoring the .htaccess file or something. I tried copying index.html to index.rhtml and if you access that file as above then it will just display the code on the page. This also tells me that CGI is not working.
    Last edited by Andrew Christensen; 10-24-2006 at 08:53 PM.

  5. #15
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default

    Hello Andrew,
    Quote Originally Posted by Andrew Christensen
    That's really weird. There's no index.php file in that rails location. Maybe you don't quite get the way RoR works...
    Correct, it appears Rob has not used RoR before. This is why RoR is not supported by Spry, not all of our technicians are versed in this relatively new framework.
    Quote Originally Posted by Andrew Christensen
    The most optimal setup is to have the Ruby files run through FastCGI. The problem is that cPanel has some inherent issues with getting FastCGI running. You can download and install it 3 million times and never get running. There is some setting somewhere that I just don't know of. I keep seeing people put up basically the same tutorial on getting it running on cPanel, but so far as yet have not been able to get it working.
    I agree that installing FastCGI (or any other modification to Apache) can be stressful with cPanel (just try to do the same thing with Plesk though.) It is possible though. I've installed it myself a few times, and I know many of our customers have installed it.
    Quote Originally Posted by Andrew Christensen
    I was kind of counting on you guys as the server support people to be able to track down this issue and solve it.
    As FastCGI/RoR is not directly support by Spry (3rd party applications) it is not included with our standard support. Actually, 3rd party application support isn't even covered by our Advanced Support option. Support Policy. We can however install 3rd party applications, like FastCGI/RoR at a rate of $100/hour.
    Quote Originally Posted by Andrew Christensen
    We aren't server admins. We have basic understanding of how to operate our servers and have chosen to host with you under the belief that you can provide this support.
    Our Managed server products come with that level of support, but our VPS's come with root level access so you may manage all aspects of your server without having to pay for dedicated server/support prices. Our support is limited to what software/hardware we provide you. We cannot provide free support for all software available online. We simply do not have the resources to be able to do so.
    Quote Originally Posted by Andrew Christensen
    Please let me know if you can find out the following:

    1. Why FastCGI will not start when the LoadModule for FastCGI is added to the httpd.conf file and Apache is restarted.
    The most common reason for this is the module is not properly compiled. If php is working on your server, create a phpinfo page. This will show a list of all the loaded modules. Also, run
    Code:
    /usr/local/apache/bin/apachectl configtest
    to have apache check your configuration for errors. Oftentimes this will display the root of the problem.
    Quote Originally Posted by Andrew Christensen
    2. Why the basic operation of CGI will not work either. Following your instructions, I did a basic build of a rails app, which SHOULD work as a default with CGI.
    Quote Originally Posted by Andrew Christensen
    If you click on the link "About your application's environment", you will see the message that something isn't working. This tells me that CGI is not working.
    I would guess that it is working. That "About your application's environment" message actually says:
    For security purposes, this information is only available to local requests.

    This means you can only view that information if the browser is running on the same system as the Rails application. i.e. http://127.0.0.1/rails_app
    Quote Originally Posted by Andrew Christensen
    I need to get this running right away. I have come to an understanding from other sources that cPanel is finishing up some kind of module or something that can be installed that will enable Ruby on Rails applications automatically, but they are still a week or two out. I need this sooner.
    Interesting, I had not heard of this module. I will keep an eye out for it.

    If you are serious about needing this functionality sooner, log in to our support section and create a ticket requesting "Custom Application Installation" support. The rate is $100/hour. Please note that we only have one administrator familiar with FastCGI/RoR installation (moi) so scheduling may be an issue.
    Quote Originally Posted by Andrew Christensen
    Thanks for your help. By the way, do you guys have an AIM/MSN/Yahoo account that I can contact you guys with so that I don't have to get on the phone and disturb everyone around me when I need help?
    No.

  6. #16
    Junior Member Newbie
    Join Date
    Oct 2006
    Posts
    8

    Default

    Thanks for the info. I will try your suggestions to see what I come up with. I will submit a ticket if we need to have you proceed with the installation.

  7. #17
    Junior Member Newbie
    Join Date
    Oct 2006
    Posts
    8

    Default

    Ok. Thank you for pointing me to the configtest option. I was able to narrow the problem down. At this point, it appears to be working but not quite as expected. You might be able to just point me in the right direction here.

    It seems that it has something to do with the .htaccess.

    For instance, if I go to http://www.computer-recon.com/admin, I get the Bad Request. (The /admin is just a symlink to http://www.computer-recon.com/support/public folder). BUT, if you add a trailing "/" after admin it redirects me to the default controller/action specified in the routes.rb file. I am not terribly familiar with the .htaccess file setup but shouldn't it work with or without the trailing "/"?

  8. #18
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default

    Quote Originally Posted by Andrew Christensen
    shouldn't it work with or without the trailing "/"?
    Unfortunately, no. With Apache 2 it does seem to work without the trailing "/", but the way Apache 1.3 handles URLs that don't end in "/" or a direct file location it doesn't.

    Try adding an alias or redirect in the VirtualHost definition instead of using a symlink. That should work with or without the trailing "/".

  9. #19
    Junior Member Newbie
    Join Date
    Oct 2006
    Posts
    8

    Default fcgi_tmp folder losing permissions

    Somehow, the /tmp/fcgi_tmp folder keeps getting the permissions set from 777 (where I want it) to something else. It then buggers up the entire ruby system. Is there some kind of server routine running that is overwriting my permissions setting? I need this to stay at 777.

    Thanks.

  10. #20
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default

    Many Linux distributions will set up a "tmpreaper" cron job to clean out the /tmp directory occasionally. Most that I've seen actually do this at shutdown/reboot. I'd recommend taking a look at the scheduled tasks run by cron and investigating what they do. Standard locations for cron include /var/spool/cron, /var/lib/cron, /etc/cron.d, /etc/cron.daily, /etc/cron.weekly, /etc/cron.hourly...

    Alternatively, reconfigure your FastCGI installation to use an alternate directory outside of /tmp

Bookmarks

Posting Permissions

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