4 Replies - 1701 Views - Last Post: 29 October 2010 - 09:56 AM Rate Topic: -----

#1 Dark_Necros  Icon User is offline

  • D.I.C Head

Reputation: -7
  • View blog
  • Posts: 239
  • Joined: 29-May 09

Using the ruby interpreter?

Posted 27 October 2010 - 05:03 PM

I feel really stupid about asking this, but how do i use the ruby interpreter provided here I have tried to find how on the site, in the readme and in the other documentation provided with the installation, but I am unable to find it. I have tried to use the command ruby directly drom the prompt, i have tried using the interactive, and i am completely lost.

Is This A Good Question/Topic? 0
  • +

Replies To: Using the ruby interpreter?

#2 5thWall  Icon User is offline

  • Occasional Member

Reputation: 31
  • View blog
  • Posts: 529
  • Joined: 17-September 08

Re: Using the ruby interpreter?

Posted 29 October 2010 - 08:35 AM

When you say you've tried using the ruby command and you've tried using the interactive do you mean that they never ran, or didn't run as you expected, or did run and you didn't know how to use them.

To run the ruby command, you need to give it a ruby file to interpret. Create your file, got to the folder where you put it in your command prompt/shell/terminal/whatever and type ruby <name of ruby file>.

To run interactive ruby just type irb in your command prompt or open it directly. If you need help getting started with interactive ruby I suggest checking out http://tryruby.org/ because it has a tutorial built in.
Was This Post Helpful? 0
  • +
  • -

#3 Dark_Necros  Icon User is offline

  • D.I.C Head

Reputation: -7
  • View blog
  • Posts: 239
  • Joined: 29-May 09

Re: Using the ruby interpreter?

Posted 29 October 2010 - 09:45 AM

well, on my desktop, the ruby command doesnt work. On my laptop (Linux :)) i dont remember what it says. just remember that i was unable to run the program. I navigated to the directory that my *.rb file was in (it was the hello world one) and I typed
ruby helloworld.rb
. it gave me some kind of error, but i don't remember. i will try again tonight. Idk, i may have done something wrong, but didnt realize it.
Was This Post Helpful? 0
  • +
  • -

#4 SarumanTheWhite  Icon User is offline

  • D.I.C Regular

Reputation: 67
  • View blog
  • Posts: 339
  • Joined: 04-November 08

Re: Using the ruby interpreter?

Posted 29 October 2010 - 09:47 AM

You're probably going to need to add the path to the ruby interpreter to your environment variables. For your desktop anyway.

This post has been edited by SarumanTheWhite: 29 October 2010 - 09:49 AM

Was This Post Helpful? 0
  • +
  • -

#5 Dark_Necros  Icon User is offline

  • D.I.C Head

Reputation: -7
  • View blog
  • Posts: 239
  • Joined: 29-May 09

Re: Using the ruby interpreter?

Posted 29 October 2010 - 09:56 AM

does Code:Blocks support ruby interpretation?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1