SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    London
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    New to Ruby and Ruby with Rails

    Hi,

    I have developed applications using PHP for some time now but have decided to see what the buzz is about Ruby with Rails.

    I was hoping someone could answer my somewhat general questions:

    i) is Ruby and Ruby with Rails good on system load ? Can it cope with the same amount of usage as PHP ?

    ii) I understand you can use Ruby with Rails with Apache. Does this mean there is no need at all to use the Ruby with Rails server ? If so, which Apache module is required ?

    iii) Is the Apache module for Ruby (or Ruby with Rails) good and stable ?

    iv) anyone know any large (several million PV/day) websites that use Ruby with Rails ?

    v) can Ruby with Rails be used as a complete replacement for PHP in terms of web development ?

    Thanks to any who can answer my questions

  2. #2
    throw me a bone ... now bonefry's Avatar
    Join Date
    Nov 2004
    Location
    Romania
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i) I think so, although there are no case-studies ... but you can always test the application yourself as there are many tools for stress testing out there

    ii) mod_ruby is the name of the module. Ruby on Rails is not a server.

    iii) No. mod_ruby sucks. People ussualy use Ruby through FastCGI ... and Apache's support for FastCGI is also rather poor, so Lighttpd is recommended

    iv) http://www.flickr.com

    v) yes

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    London
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply

    I was thinking of learning Ruby with Rails for the purpose of developing one of two things. Either a replacement for the scripting part of my website (which does receive that sort of traffic) or to make a Project Management/CRM intranet system.

    It sounds as if Ruby w/ Rails sounds viable for these projects. But certainly the Project Management/CRM system.

  4. #4
    SitePoint Guru worchyld's Avatar
    Join Date
    Jul 2003
    Location
    Newcastle upon Tyne
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just found installing RoR with Apache just too confusing and very frustrating, I used the on board server Webtrick (or something) and I followed a tutorial on the onlamp site and it worked fine... though you do need a mysql.so file and a .dll file for RoR to talk with mysql.

    The problem with using the onboard server is that every now and again you have to restart the server (all done via command prompt or dos prompt)... and I find that bit very frustrating ...

    There are packages out there such as Instant Rails and I recently saw an add-on for XAMPP but not investigated either in too much detail.

  5. #5
    SitePoint Zealot
    Join Date
    Feb 2003
    Location
    Mexico City
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Webrick is only intended for testing purpuses, IMHO.

    You should use Lighttpd like bonefry recommends.

    Ruby is indeed slower than PHP, although that should change with time.

    bonefry, where did you get the misconception that Flickr was on RoR?

    http://en.wikipedia.org/wiki/Flickr#...e_Architecture

    You can find *real* real world RoR usage here: http://wiki.rubyonrails.com/rails/pages/RealWorldUsage

    Although I think the most representative are 37s' own apps, like Basecamp.

  6. #6
    throw me a bone ... now bonefry's Avatar
    Join Date
    Nov 2004
    Location
    Romania
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ivanv
    bonefry, where did you get the misconception that Flickr was on RoR?
    I have no ideea.
    Maybe I associate cool websites with Rails ?

  7. #7
    SitePoint Guru
    Join Date
    Jan 2001
    Location
    Alkmaar, Netherlands
    Posts
    710
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have developed in both PHP(3 yrs) and RoR (since its release). I feel very confortable developing with RoR because framework takes care of most of the work we do (of course you might have your own PHP libraries that you reuse all the time but it will never be as powerfull as RoR's libraries).

    RoR helps you to use some standards like MVC (I do love MVC -Model, View, Controller)structure, database model standarts. Even when I was developing in PHP I was trying to create my own MVC but it comes default with Rails now.

    Ruby is a fantastic language to work with.
    For example(I could not help myself);

    PHP Code:
    products Product.find(:all, :conditions => [ "user_id=?"session[:user].id])
    products.each do |product|
      
    product.name
    end 
    RoR recently won Jolt award for both RoR and the Book (from RoR's creator's blog: http://www.loudthinking.com/arc/000573.html)

    i) It can be heavy if you write sloppy programs because it creates database queries for you. You should really check how you can optimize your calls to the database. I would strongly suggest to look at caching in RoR, it generates htmls on the fly and with observers it removes them when data has been changed.

    ii) I prefer using with lighttpd/fcgi. There are not many hosts supporting RoR yet (www.textdrive.com is my preference right now; they support lighttpd/fastcgi)

    iii) Go for lighttpd/fastcgi for time being

    iv/v) YES. http://blog.segment7.net/articles/20...06/2-5-million

  8. #8
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately not, flickr is written almost entirely in PHP with the exception of some small image processing utilities written in java.

    However, BaseCamp, Writeboard, Ta-da list and all other 37 signals products are written in Rails (by the guy who wrote Rails in fact).

    http://www.basecamphq.com and http://www.37signals.com

  9. #9
    SitePoint Member coder_'s Avatar
    Join Date
    Apr 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe the Flickr on Rails video tutorial on the Rails site too.


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
  •