SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Hybrid View

  1. #1
    if ($zee == "Guru") { $zee--;}
    Join Date
    Nov 2005
    Location
    Karachi - Pakistan
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I Wanna Learn It !

    Hi

    I have IIS 5, please guide me how to setup this scripting language on XP Pro.

    Thanks
    zeeshan

  2. #2
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm assuming you want to learn Ruby. In which case download the One-Click Ruby installer from RubyForge. This makes installing Ruby on an XP system very easy. It will also install documentation and a ruby editor. Make sure that the option to install gems is selected.

    There's everything you need there to get started. Have a look at the documentation (Start > Programs > Ruby > Ruby{version no.} > Ruby Documentation) and in particular the "Ruby Book Help" which is an electronic version of the original edition of Progmatic's "Programming Ruby" Book. Working through that is a good start into Ruby.

    If you want to play with Rails, after you've installed Ruby, you can install it using this command:
    Code:
    gem install rails --include-dependencies
    With Rails you'll probably also need to install a database. MySQL community edition is a good start. On Windows I'd recommend you install the GUI tools for MySQL. They work well and make managing your databases very easy.

    For Rails this is as good a place to start as any:

    http://www.sitepoint.com/article/rails-for-beginners/

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,271
    Mentioned
    197 Post(s)
    Tagged
    3 Thread(s)
    I had some trouble trying to use "InstantRails" so I gave up and installed things separately, I have Windows98, so things may go easier for you with XP, but if not maybe some of my fixes will help http://www.sitepoint.com/forums/showthread.php?t=563276

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,033
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I installed it separately on Linux and it worked well but I'm using InstantRails on XP and it couldn't be easier so far. Everything works just fine but I had to manually start MySQL and edit the config/database.yml file to use MySQL. It wanted to use sqlite3 out of the box.

    I wouldn't bother with IIS... I think the built in Apache or Mongrel servers will be snappier and have less config troubles.
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  5. #5
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    InstantRails is fine if you only want to have a quick look at Rails. But for anything else, installing the required components separately is so easy and so much more flexible, that using InstantRails is a mistake in my opinion.

    This is especially the case if you use Mongrel and MySQL.

    The one-click Ruby installer is another matter. It's great and makes running Ruby on Windows very easy to set up.

  6. #6
    if ($zee == "Guru") { $zee--;}
    Join Date
    Nov 2005
    Location
    Karachi - Pakistan
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there any IDE for Ruby ? Like is it a scripting like PHP or ASP ? or it is some thing all different ?

    can any one post a sample Ruby code here ? just a few lines.

  7. #7
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,033
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I like using Komodo Edit 4...
    It's free, has some auto-complete facilities for Ruby as well as HTML (RHTML), and CSS.

    http://www.activestate.com/Products/...odo_edit.mhtml
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  8. #8
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,033
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Sorry, I just reread your message....

    It is a scripting environment.... The easiest way I've found to get started is by using InstantRails. It includes the Ruby console window as well as the mongrel webserver with Ruby interpreting.

    You can use the console window to script objects and interact directly with them.

    I hope that helps.
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  9. #9
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ruby behaves in a similar way to scripting languages like VBScript (ASP) and PHP. You can do simple things like say "Hello World":
    Code:
    puts "Hello World"
    But its more flexible than either (though you may get some PHP pundit's who would disagree).

    One of its best points is that its object orientated. So you create objects and then manipulate those objects. And you can do splendid things like inherit a set of properties from one object to another. So you can do things like this:
    Code:
    class Animal
      def initialize(name)
        @name = name
        @legs = 4
        @say = "somthing"
      end
      
      def name
        @name
      end
      
      def legs
        @legs
      end
      
      def say
        @say
      end
      
      def describe
        puts "#{name} is a #{self.class}, has #{legs} legs and often says '#{say}'." 
      end
    end
    
    class Dog < Animal
      def initialize(name)
        @name = name
        @legs = 4
        @say = "Whoof"
      end  
    end
    
    class Cat < Animal
      def initialize(name)
        @name = name
        @legs = 4
        @say = "Meow"
      end
      
    end
    
    class Man < Animal
      def initialize(name)
        @name = name
        @say = "Hello there"
        @legs = 2
      end
    end
    
    bob = Man.new("Bob")
    fred = Dog.new("Fred")
    anne = Cat.new("Anne")
    
    bob.describe
    fred.describe
    anne.describe
    You can write that in a text editor like Windows notepad, save it in a file called animals.rb then run in with the command ruby animals.rb run in the folder where the file was saved (after you've installed Ruby of course).

    However there are a number of good IDEs. In my opinion the best at the moment is NetBeans.
    Last edited by ReggieB; Oct 26, 2008 at 13:50.

  10. #10
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Zeeshan,

    If you want to learn Ruby, I highly recommend "Simply Rails 2", 2nd edition by Patrick Lenz, published by SitePoint themselves. Excellent book to learn the idealogy behind Ruby and Rails, why it's such a great language, how to prepare your workstation to develop code, and the teach you how to build a basic Digg-like application. Just enough to get excited and want to learn even more...

    Rails is so much more interesting as a language on a Mac however, being a UNIX-based OS with a bash shell, and with the excellent Textmate text editing application.

    -d

  11. #11
    SitePoint Zealot phillipus_rex's Avatar
    Join Date
    Jan 2007
    Location
    Silicon Holler
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are lots of good IDE's out there, but the best one that I have seen for Ruby is RadRails.

    It is a plug in for Aptana (which runs off of Eclipse like many quality editors do).

    I've tried it and it's very intuitive and has good debugging capabilities and code completion.

    However, NetBeans is not a bad option either.

    EDIT:

    I just remembered: If you don't mind spending a few bucks, there is an awesome Rails plug-in for Visual Studio! It's called Ruby in Steel. You could probably type it into google and read more about it.
    Last edited by phillipus_rex; Nov 9, 2008 at 19:10. Reason: More info.
    "Be kind, for everyone you meet is fighting a
    hard battle." -Plato

  12. #12
    SitePoint Member Valerie08's Avatar
    Join Date
    Nov 2008
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm eager to learn Ruby, too. I've already downloaded the Ruby installer and I'm currently trying to learn.
    I love this Handy Shop!


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
  •