From: Jeremy Bopp Date: 2010-10-23T01:05:21+09:00 Subject: Re: Ruby Compile. On 10/22/2010 10:57 AM, Tridib Bandopadhyay wrote: > I am running Ruby 1.8.1 on CentOS release 4.8(Final).. > > I have compiled the Ruby and my 'make test' command gives me test > succeeded. > > > > Can I run a small ruby code without installing ruby.If so,how to do.. > > I tried to run a small program but when trying to run it as > > --ruby calc.rb >>>It shows command not found. In the top level of your Ruby source directory should be the compiled ruby program. The problem that this path is not in your PATH environment variable, so simply invoking ruby as "ruby" will not find it. There are a couple of options available to you: 1) Add the path to the directory containing the ruby program you built to your PATH environment variable: PATH=/path/to/ruby/source:$PATH 2) Run ruby using an explicit path to ruby such as: /path/to/ruby/source/ruby calc.rb There are other variations on these options, but these are the basics. -Jeremy