Code Project: Create a web server in Ruby
Mar 24, 2009, 06:02 (0 Talkback[s])
"Setting up
First off, you'll need to install the Ruby interpreter, which
should be in your package manager's repositories. You'll also want
to install Irb, the interactive Ruby interpreter, which is supplied
in a separate package in some distros.
"Once these things have been installed, fire up an interactive
Ruby session by entering irb at a shell prompt. This will pop up a
prompt for you to start entering Ruby statements. It's almost law
that every coding guide starts with a Hello World instruction, but
we'll bend the rules a little here. Run
puts "Goodbye moon!"
"That's pretty self-explanatory - puts outputs the supplied
string to the screen. However, one of the most crucial features of
Ruby to note is that everything is an object. Yes, even literal
strings. It's pretty weird, but it enables you to do things
like:"
Complete Story
Related Stories:
- Wicked Cool Ruby Scripts(Feb 06, 2009)
- Do Ruby on Rails Developers Need Merb?(Oct 16, 2008)
- Easy Ruby Development, the Eclipse Way(Aug 17, 2008)
- Ruby on Rails Upgrade Eyed(May 28, 2008)
- Consuming RSS Feeds with Ruby(Mar 12, 2008)
- Telling Time with Ruby(Feb 22, 2008)
- Java vs Ruby: A Comparison of the Key Elements(Dec 14, 2007)
- Lots of REST For Ruby on Rails 2.0(Dec 12, 2007)
- Urbis.com Founder Relies on Passionate Ruby Developers(Nov 28, 2007)
- Quickstart: Debugging Ruby on Rails Applications(Oct 29, 2007)