Hi
I have IIS 5, please guide me how to setup this scripting language on XP Pro.
Thanks
zeeshan
| SitePoint Sponsor |





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



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:
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.Code:gem install rails --include-dependencies
For Rails this is as good a place to start as any:
http://www.sitepoint.com/article/rails-for-beginners/


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
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



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.





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.
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
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



Ruby behaves in a similar way to scripting languages like VBScript (ASP) and PHP. You can do simple things like say "Hello World":
But its more flexible than either (though you may get some PHP pundit's who would disagree).Code:puts "Hello World"
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:
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).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
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.
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

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
I'm eager to learn Ruby, too. I've already downloaded the Ruby installer and I'm currently trying to learn.
Bookmarks