How do I run a text.txt or a analyzer.rb

Hi, everyone.

How do I run a .rb file in command prompt? I was in the command prompt,
using irb, but I don’t understand why my .rb files looks like a regular
text file. And I don’t know how to execute them either.

Is there something wrong with my ruby installation or something?

Thanks,

Marvin

Thanks,
It works! I put ruby first, then analyzer.rb in the command prompt.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 31.07.2010 20:40, schrieb Tony Mr:

Thanks,

Type

ruby “your_file_here.rb”

to run a Ruby file. And yes, Ruby sourcecode files are in fact regular
text files, they’re nothing special. Ruby code doesn’t have to be
compiled as C code does.

Vale,
Marvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxUhcwACgkQDYShvwAbcNk01QCfXJgxlnn66E4DZYJQpHa5YYlS
0REAoJXIMr8IGa9LTTvRJQyufOyWru9H
=ooEi
-----END PGP SIGNATURE-----

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs