Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 help ruby ahhh ugh help
Index -> Programming, Ruby -> Ruby Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
dirwin




PostPosted: Thu Mar 24, 2005 11:10 am   Post subject: help ruby ahhh ugh help

hi
i just got ruby yesterday and im having a problem with it well actualy having a problem with the documentation that comes with it it said

*The easiest way to run Ruby interactively is simply to type ``ruby'' at the shell prompt*

im on xp pro its probly a microsquish problem
but i opened up command prompt and got nothing when i typed in ruby i think i froze it Smile
and then i found out that ruby comes with an interactive shell program thingy so i typed ruby in on that thing and got an error *NameERROR*
could anyone inlighten me to what the shell prompt is that there talking about or is this somthing that i dont have because im using microcrap?

thanks
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Mar 24, 2005 11:33 am   Post subject: (No subject)

the proper syntax for using Ruby is as follows (from the shell)
terminal:

ruby script_name.rb

to execute the script you wrote and saved as a file.

to play with Ruby interactivly
terminal:

irb

That will bring up the interactive shell mentioned
dirwin




PostPosted: Thu Mar 24, 2005 11:42 am   Post subject: (No subject)

woohoo it works now Smile
thanks
dirwin




PostPosted: Thu Mar 24, 2005 2:02 pm   Post subject: (No subject)

i just found out that ruby is not really made to work on windows xp but more for unix. Smile just another reason to leave microsquish
im going to get unix or linux when i find a good free one to try
but thanks for the help with that problem Smile
Tony




PostPosted: Thu Mar 24, 2005 2:39 pm   Post subject: (No subject)

oddly enough Ruby is easier to install in Windows (due to their packaged release).

Though on the other hand, OSX comes with Ruby preinstalled Wink (unfortunatly it's only 1.6.x, but that's besides the point)
dirwin




PostPosted: Thu Mar 24, 2005 3:11 pm   Post subject: (No subject)

i read that the on that comes with osx has a tendency to crash alot Smile
wtd




PostPosted: Thu Mar 24, 2005 3:50 pm   Post subject: (No subject)

dirwin wrote:
i read that the on that comes with osx has a tendency to crash alot Smile


I never experienced that. However, 1.8.x is worth having, and the best way to get it is to build from source.
wtd




PostPosted: Thu Mar 24, 2005 3:51 pm   Post subject: (No subject)

dirwin wrote:
i just found out that ruby is not really made to work on windows xp but more for unix. Smile just another reason to leave microsquish
im going to get unix or linux when i find a good free one to try
but thanks for the help with that problem Smile


Like Tony said, it'll work fine with Windows, as long as you get all of the PATH quirkiness worked out (and that's a shortcoming of the OS, not Ruby).

Good luck with your Ruby adventures. Smile
Sponsor
Sponsor
Sponsor
sponsor
Hikaru79




PostPosted: Sat Apr 02, 2005 7:05 pm   Post subject: (No subject)

tony wrote:
oddly enough Ruby is easier to install in Windows (due to their packaged release).


Well, depends on your distribution. Debian and Gentoo have it easy -- 'emerge ruby' and 'apt-get install ruby' and that's it.
Display posts from previous:   
   Index -> Programming, Ruby -> Ruby Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: