This is a discussion on Ruby on Rails within the Ruby forums, part of the Web Development category; Installing Ruby and Rails The installation process of Ruby and Rail on Windows, MAC and Linux are discussed detail in ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Installing Ruby and Rails The installation process of Ruby and Rail on Windows, MAC and Linux are discussed detail in the following thread. http://www.discussweb.com/ruby/4012-...s-windows.html thanks |
|
#2
| |||
| |||
| Getting Started with Ruby Ruby is the language that is going to make everything happen. To work with Ruby, you need a text editor of the kind you already used to get the Ruby on Rails example working, such as word pad (Start➪ Programs➪Accessories➪WordPad) or Notepad (Start➪Programs➪Accessories➪Notepad) in Windows. Each Ruby program should be saved with the extension .rb |
|
#3
| |||
| |||
| Hello World in Ruby To get started with Ruby and make it display a Hello World message, follow these steps:
C:\rubydev>ruby hello.rb Hello World. |
|
#4
| |||
| |||
| Working with Numbers in RUBY To get started with numbers in Ruby, follow these steps:
Quote:
|
|
#5
| |||
| |||
| Working with Strings in Ruby To get started with strings in Ruby, follow these steps:
Quote:
|
|
#6
| |||
| |||
| Ruby’s reserved words:
|
|
#7
| |||
| |||
| Storing Data in Variables - Working with Variables To get started with variables in Ruby, follow these steps:
Quote:
|
|
#8
| |||
| |||
| Creating Constants You can also create constants in Ruby. A constant holds a value that you do not expect to change, such as the value of pi: PI = 3.1415926535 IP_SERVER_SOURCE = “903.111.333.055” IP_SERVER_TARGET = “903.111.333.056” Unlike other languages, Ruby allows you to change the values in constants by assigning a new value to them: CONST = 1 CONST = 2 However, you’ll get a warning each time you do this: constants.rb:2: warning: already initialized constant CONST |
|
#9
| |||
| |||
| Interpolating Variables To get started with interpolating expressions in double-quoted strings in Ruby, follow these steps:
Quote:
|
|
#10
| |||
| |||
| Reading Text To get started reading text in Ruby, follow these steps:
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Installing Ruby and Rails on Windows | prasannavigneshr | Ruby | 3 | 01-09-2009 04:24 AM |
| PHP vs Ruby | suman | PHP Programming | 2 | 10-02-2008 12:59 AM |
| Ruby on Rails server config | vivekanandan | Ruby | 7 | 08-04-2007 04:02 AM |
| setting up ruby on rails in Fedora core 6 | rgm5 | Ruby | 1 | 04-17-2007 11:42 PM |
| Ruby IDE | drecko | Ruby | 0 | 02-16-2007 12:11 AM |
Our Partners |