From: Rajinder Yadav Date: 2010-10-23T04:03:19+09:00 Subject: Re: Ruby Compile. On Fri, Oct 22, 2010 at 11: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. > > -- > Posted via http://www.ruby-forum.com/. > > try building the ruby source this way so it builds and installs under your home folder, you can later just delete this folder without worry cd ~ mkdir -p ruby/local/ now cd into the source folder where you extracted the ruby source NOTE: the use of tilda ~ in the path below, you want to install it under your home folder ~/ruby/local/ ./configure --prefix=~/ruby/local make make test make install export $PATH=~/ruby/local:$PATH now test if you can run ruby with: ruby -v the export command will only be good for the current session, if you want to make it permanent, save it to you bash start up file nano ~/.bashrc add the line at the bottom of your file $PATH=~/ruby/local:$PATH save and exit the file btw, i am assuming you're using the bash shell. if you still don't know what to do ask your sysadmin for help at school -- Kind Regards, Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely GNU/Linux: 2.6.35-22-generic Kubuntu x86_64 10.10 | KDE 4.5.1 Ruby 1.9.2p0 | Rails 3.0.1