From: "DaShiell, Jude T. CIV NAVAIR 1490, 1, 26" Date: 2010-10-26T02:36:26+09:00 Subject: Re: Ruby Compile. First if you built in /usr/local/src, /usr/local/src/ruby-1.9.2/bin is likely to hold your ruby executable. So be in the same directory then run ./ruby calc.rb with calc.rb being temporarily placed in that bin directory. I think you'll have your expected results once you do that. Hth. -----Original Message----- From: Ammar Ali [mailto:ammarabuali@gmail.com] Sent: Monday, October 25, 2010 13:25 To: ruby-talk ML Subject: Re: Ruby Compile. On Mon, Oct 25, 2010 at 7:40 PM, Tridib Bandopadhyay wrote: > @Rajinder Yadav > > I don't want to install ruby. I just want to compile it which is done > for me. > > As its showing test succeeded on Make test command.But i tried a simple > ruby code as > > puts 1+2 > > with file named calc.rb and tried to run it with command. > > ruby calc.rb>>> Its telling me command not found. Yes. You didn't install ruby, you just compiled it. The system can't find the ruby command you compiled. > ___________________________________________________________ > Secondly I tried what you said in my home directory within the server. > > ./configure --prefix=~/ruby/local > > Its telling me. > > configure: error: expected an absolute directory name for --prefix: > ~/ruby/local The suggestion is good. You need to replace the '~' in the path with the path of your home directory: ./configure --prefix=/home/your-user-name/ruby/local You might also need to create the path for 'ruby/local' with: mkdir -p ~/ruby/local Rajinder's comments tell you how to add that special path (the system doesn't know to look there) to the system's list of places to look for commands, so you can just type: $ ruby 'puts 1 + 2' instead of: $ /home/your-user-name/ruby/local/bin/ruby HTH, Ammar