SitePoint Sponsor

User Tag List

Results 1 to 14 of 14

Thread: Ruby and Gentoo

  1. #1
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ruby and Gentoo

    Are there other folks here using Gentoo and Ruby?

    In reading about Ruby performance, it sounded like going for FastCGI was the best option for performance. I have tried following a few resources like this, but stumbled at the first steps. The eruby ebuild seems to fail on all systems I try to build it on.

    Has anyone else had any luck getting this configuration running?
    Jason Sweat ZCE - jsweat_php@yahoo.com
    Book: PHP Patterns
    Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
    Detestable (adjective): software that isn't testable.

  2. #2
    simple tester McGruff's Avatar
    Join Date
    Sep 2003
    Location
    Glasgow
    Posts
    1,690
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes. So far all I've managed is hello world though

    I wish there were more hours in the day...

  3. #3
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have Rails running through webbrick, just not FastCGI. I know the applications I would roll out initially would have no noticable performance requirement either way, but I just wanted to do it right for the sake of doing it right

  4. #4
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah I installed it just as per normal (not using fcgi) - but it took a bit of messing around to get working.

    Easiest way I've found is just

    PHP Code:
    # emerge ruby rubygems
    # gem install rails 
    and my config file in /etc/apache2/conf/modules.d/20_mod_ruby.conf needed everying uncommented.

  5. #5
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by platinum
    and my config file in /etc/apache2/conf/modules.d/20_mod_ruby.conf needed everying uncommented.
    I performed the same emerges. Have it working if I run
    # ruby scripts/server &

    But I don't recall poking around in the mod_ruby.conf file, will have to look there.

    Thanks.
    Jason Sweat ZCE - jsweat_php@yahoo.com
    Book: PHP Patterns
    Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
    Detestable (adjective): software that isn't testable.

  6. #6
    SitePoint Guru 33degrees's Avatar
    Join Date
    May 2005
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I recall reading that performance under fastcgi is much better than under mod_ruby, so that may be something to keep in mind...

  7. #7
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Yakima WA.
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out my thread on installing the whole rails/gems/lighttpd/fastcgi/php stack. I've used it to do over 20 rails installs and I am running production sites with the setup.

  8. #8
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's the link if anyone's looking for it and is lazy

    http://www.sitepoint.com/forums/showthread.php?t=301842

  9. #9
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Revisiting these issues, I think some of my problems stem from using ruby-1.8.3 pre release packages. All of the 1.8.3 versions seem to have some problems working and playing with other packages (rails code, eruby, etc). Forcing back down to the latest 1.8.2 release seems to have eased some of my intergration headaches.

    HTH
    Jason Sweat ZCE - jsweat_php@yahoo.com
    Book: PHP Patterns
    Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
    Detestable (adjective): software that isn't testable.

  10. #10
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Yakima WA.
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes ruby 1.8.3 has made changes to the std Logger class. There is a fix in edge rails but not in the stable version. So it is recommended to use 1.8.2 until the next stable release of rails. Which is rapidly approaching 1.0 ;-)

  11. #11
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ruby 1.8.3 on Gentoo

    Hello,

    I tried:

    Code:
    emerge rails
    and all the dependencies came in from there. Ruby 1.8.3, etc.

    All of the apache configs the various docs ask for were already there in my current setup. But I'm still getting weirdness and 403 errors, even after aliasing the directory, etc.

    It works great from the command line, but my goal is to have it working from Port 80.

    ???

  12. #12
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can see I had problems with Ruby-1.8.3, you might have better luck doing

    emerge =dev-lang/ruby-1.8.2-r2

    to change the port, just edit the port number to 80 in the scripts/server on the
    :port => 3000,
    line.
    Jason Sweat ZCE - jsweat_php@yahoo.com
    Book: PHP Patterns
    Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
    Detestable (adjective): software that isn't testable.

  13. #13
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    Stillwater, MN
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sweatje
    You can see I had problems with Ruby-1.8.3, you might have better luck doing

    emerge =dev-lang/ruby-1.8.2-r2

    to change the port, just edit the port number to 80 in the scripts/server on the
    ort => 3000,
    line.
    You can also do `script/server -p 80` if you just want to switch the port temporarily.
    Rad Smith
    My blog

  14. #14
    Resident Java Hater
    Join Date
    Jul 2004
    Location
    Gerodieville Central, UK
    Posts
    446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From experience, I wold say that you will get better performance from using native C MySQL bindings than the Ruby based ones, than switching webserver. I guess this to some degree depends on your applications use of the database, and what mode you are using (development mode uses a lot of reflective SQL to get table info). However I don't know if that applies to you being an Oracle user. Maybe you have similar C bindings about for Oracle.

    I would stay clear from Apache. You'll probably have little luck with Apache 2.x being stable. I think 1.x isn't too bad though. Unless you have stuff that specificly uses Apache, move to lightty. If you need both, you are better running the main / most used webserver on port 80, and using another port for the other server, and then using the proxy module in one of the webservers to pipe requests through. Can't say it's a very elegant solution, but it's better than running Ruby on Apache.


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
  •