1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Ruby on Rails

Discussion in 'Plesk for Linux - 8.x and Older' started by ariejan, Dec 8, 2006.

  1. ariejan

    ariejan Guest

    0
     
    I'm trying to figure out how to get a Ruby on Rails ( RoR ) application running.

    I've already updated public/dispatch.fcgi (and .cgi) to use /usr/bin/ruby1.8

    Beside from that I get a 'premature end of script headers' errors in the apache logs.

    Any clues on how to get a rails app running are greatly appreciated.
     
  2. Dawn

    Dawn Guest

    0
     
    Is there a way how can I test if RoR works? Some script like phpinfo?

    Greets,
    Dawn
     
  3. zero@

    zero@ Guest

    0
     
  4. Dawn

    Dawn Guest

    0
     
    Hi Zero,

    THX for your answer. I've followed the instructions I found @ your link. The most if it worked, but not everything:

    ruby1.8 script/server
    => Booting WEBrick...
    => Rails application started on http://0.0.0.0:3000
    => Ctrl-C to shutdown server; call with --help for options
    [2006-12-18 10:45:13] INFO WEBrick 1.3.1
    [2006-12-18 10:45:13] INFO ruby 1.8.2 (2005-04-11) [i386-linux]
    [2006-12-18 10:45:13] WARN TCPServer Error: Address already in use - bind(2)
    /usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize': Address already in use -
    from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `new'
    from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners'
    from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `each'
    from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'
    from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'
    from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
    from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
    from /usr/local/lib/site_ruby/1.8/webrick_server.rb:59:in `new'
    from /usr/local/lib/site_ruby/1.8/webrick_server.rb:59:in `dispatch'
    from /usr/local/lib/site_ruby/1.8/commands/servers/webrick.rb:59
    from /usr/local/lib/site_ruby/1.8/active_support/dependencies.rb:147:in
    from /usr/local/lib/site_ruby/1.8/active_support/dependencies.rb:147:in
    from /usr/local/lib/site_ruby/1.8/commands/server.rb:30
    from script/server:3:in `require'
    from script/server:3

    Then I tought: Strange... Used Imap to scan my ports:

    nmap mydomain.com

    Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2006-12-18 10:35 CET
    Interesting ports on [censored].internetserviceteam.com (censored):
    (The 1647 ports scanned but not shown below are in state: closed)
    PORT STATE SERVICE
    21/tcp open ftp
    22/tcp open ssh
    25/tcp open smtp
    53/tcp open domain
    80/tcp open http
    106/tcp open pop3pw
    110/tcp open pop3
    143/tcp open imap
    443/tcp open https
    465/tcp open smtps
    993/tcp open imaps
    995/tcp open pop3s
    3306/tcp open mysql
    5432/tcp open postgres
    8009/tcp open ajp13
    8443/tcp open https-alt

    What means that port 3000 isn't used. Do you have any idea what the problem is?

    Greets and big THX again,
    Dawn
     
  5. zero@

    zero@ Guest

    0
     
    The port seems to be blocked for security reasons, and that's probably a good thing.

    If everything was generated, then Rails is set up. You just can't run the Webrick web server, which is just used for testing anyway, and shouldn't be used in a production environment.

    You can test it out through the apache2 web server just as easily. Go to www.yourdomain.com/myapp/public/

    (Of course, replace yourdomain.com with your domain, and "myapp" with the name of your rails app.)

    Again, this isn't the preferred way to have a Rails site in a production environment. This is just for testing.
     
  6. Dawn

    Dawn Guest

    0
     
    Thanks for your hints, that worked! So RoR is working... :)

    Greets and best regards from Switzerland,
    Dawn
     
  7. zero@

    zero@ Guest

    0
     
    Switzerland! I never would have guessed! :) Good morning from the States!

    In case you need any more Rails info, here's a list of tutorials, and a free RoR reference guide. Of course, you can find out more at RubyonRails.com, but you probably knew that :)

    If Rails doesn't float your boat, you could also try Django, which is python based, and should work as long as mod_python is enabled (I haven't tested yet).
     
  8. Dawn

    Dawn Guest

    0
     
    Yeah, the world is small since the internet exists :) Thanks a lot for the tutorials... I don't know RoR but it seems to be a very intresting concept.

    But I've looked a little bit deeper into the test. If I access www.mydomain.com/testapp then it isn't any problem to display the info page because there is a index.html which doesn't say much if ruby correctly work or not.

    What I've tested then was clicking on the link "About your application environment" which I think should display similar data like phpinfo(). But then there was red box with the text:

    Recognition failed for "/rails/info/properties"

    I think it doesn't fully work :(. Do you have any idea where can be the problem?

    Greets and again thx for your great help!
    Dawn
     
  9. zero@

    zero@ Guest

    0
     
    Actually, I'm having the same problem. I think it has to do with some config file that has to be edited. Perhaps config/environment.rb - but I don't know for sure. I'll probably look into it later on this week.
     
  10. Dawn

    Dawn Guest

    0
     
    It would be really nice if you'll find some time to look a litte more into it. I don't know enough about RoR to find the solution for this problem...

    Greets and best regards,
    Dawn
     
  11. mstroeck

    mstroeck Guest

    0
     
    dispatch.fcgi source displayed, not executed

    Hi,

    I'm having a problem with this: The source of my dispatch.fcgi is displayed, instead of the server executing it. Does anybody have any idea how to solve this problem?

    Have a look here to see what I mean: http://www.stroeck.com/simplelog/public

    Thanks,
    Michael Ströck
     
  12. genetic

    genetic Guest

    0
     
    any updates?

    has anyone found a solution for the port issue or the "About your application’s environment"
     
  13. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    Re: dispatch.fcgi source displayed, not executed

    Have you enabled FastCGI (mod_fcgid) in Plesk for this domain?
     
  14. genetic

    genetic Guest

    0
     
  15. jnarvaez

    jnarvaez Basic Pleskian

    27
     
    Joined:
    Mar 2, 2005
    Messages:
    93
    Likes Received:
    1
    same problem here

    Recognition failed for "/rails/info/properties"
     
  16. Dawn

    Dawn Guest

    0
     
    Any news?
     
  17. nulleffect

    nulleffect Guest

    0
     
    Im also having this problem.

    Any ideas?
     
  18. RevMagi

    RevMagi Guest

    0
     
    Same here ...

    I get the content of the dispatch.fcgi file shown as text in the browser. The domain is a fresh install with mod_fcgi support enabled. I have checked the httpd.include in the conf dir and all specs are there. If I go in as admin from the command line to the domain and execute rails myapp, it generates everything. It seems from command line, the app is not starting a server.
     
  19. Dawn

    Dawn Guest

    0
     
    Does nobody here has some free support left @ the official Plesk support? Seems to be a general problem....
     
  20. nulleffect

    nulleffect Guest

    0
     
    RevMagi:

    What OS are you using? Sometimes rails gets installed to an obscure place, have you set the shebang in dispatch.fcgi to #!/usr/bin/rails (or wherever its located on your system
     
Loading...