On Fri, Nov 16, 2007 at 11:51:58AM +1100, Voytek Eymont wrote: > I'm trying to install a ruby on rails application; > I need ruby, gems and the like > > the Centos system had ruby installed in /usr/bin > > the original ruby was too back level; > > I've installed new ruby source and installed 'as is' (defaulted to > /usr/local/bin) > > I've deinstalled original with rpm -e ruby > > however, 'default search path' still keep looking for '/usr/bin/ruby' > > # whereis ruby > ruby: /usr/lib/ruby /usr/local/bin/ruby /usr/local/lib/ruby > # ruby --version > bash: /usr/bin/ruby: No such file or directory
You hit a feature of bash here; it's has remembered where ruby used to be. The clue is in that bash has reported the full path (/usr/bin/ruby) as not being found. The fix is to type 'hash -r' Regardez: [EMAIL PROTECTED] ~] # hash hits command 1 /usr/bin/tty 3 /bin/mv 1 /usr/bin/yum 2 /usr/bin/ruby [EMAIL PROTECTED] ~] # mv /usr/bin/ruby /usr/bin/ruby- [EMAIL PROTECTED] ~] # ruby bash: /usr/bin/ruby: No such file or directory [EMAIL PROTECTED] ~] # hash -r [EMAIL PROTECTED] ~] # hash hash: hash table empty [EMAIL PROTECTED] ~] # ruby bash: ruby: command not found So it could be a false alarm. > # /usr/local/bin/ruby --version > ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-linux] > > what's my best and easiest option: > > - rebuild 'new' ruby to /usr/bin ? > - symlink new files to where old was ? Neither; you may need to do nothing, or change the #! line at the start of your script, or if ruby uses the #!/bin/env trick, possibly nothing to do. > - or should I pick a new hobby ? Are you kidding?! What could be more fun than this? -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html