Sign me up!
-taresaco
Sign me up!
-taresaco
Send an email to rando@bluehost.com with your domain name and I'll get you moved over to box85 so you can test it.
Is anyone else using Ruby? I tried this:
taresaco@taresa.com [~]# ls -la calc.rb
-rw-r--r-- 1 taresaco taresaco 8 Feb 9 16:09 calc.rb
taresaco@taresa.com [~]# ruby calc.rb
-bash: ruby: command not found
calc.rb is just one line:
puts 1+2
Maybe I'm looking at the wrong Ruby tutorial. Has anyone else had success?
Ruby isn't in your path for some reason. It's installed to /usr/local/bin/ruby.
taresaco@taresa.com [~]# cd usr/local/bin/ruby
-bash: cd: usr/local/bin/ruby: No such file or directory
Que?
If I need to tell bash where Ruby is... I'm not really sure how to do that, but I'll look it up. Is that the case?
That last ruby is the executable, not another directory. Try entering:
/usr/local/bin/ruby calc.rb
Presuming that works, enter the following:
echo $PATH
I assume /usr/local/bin won't be in the listed directories.
Edit (with something simple like pico or vi) the .bash_profile file in your homedir and on the end of the PATH line, add (without quotes) ":/usr/local/bin"
So for example, it might read:
PATH=$PATH:$HOME/bin
make that:
PATH=$PATH:$HOME/bin:/usr/local/bin
Then either source .bash_profile or simple log out and back in. Presuming the executable is where Rando says it is AND you have the appropriate access rights, that should make it work normally for you.
--DrSuSE
A couple things here...Originally Posted by Taresa
First, you're missing the leading '/'. You're telling the cd command to go to the usr directory under your current working directory as opposed to the system usr directory. Second, you can't cd to that anyway (it'll throw another error) because it's not a directory. If you want to see if the ruby executable is really there, try 'ls /usr/local/bin | grep ruby'.
If you need to tell bash about /usr/local/bin, put the following line in your ~/.bashrc (and your ~/.bash_profile if you don't have that pointing at your .bashrc):Originally Posted by Taresa
Here's a decent intro to bash. Environment settings are dealt with briefly towards the bottom of the page. And here's a link to a bash quick reference card (well, cards).Code:PATH=/usr/local/bin:${PATH}; export PATH
Edit: Looks like DrSuSE beat me to it. That's what happens when you're interrupted halfway through writing a post.![]()
Eric
----
"If you want to know what a man's like, take a good look at how he treats his inferiors, not his equals."~Sirius Black, Harry Potter and the Goblet of Fire
DrSUSE:
taresaco@taresa.com [~]# /usr/local/bin/ruby calc.rb
-bash: /usr/local/bin/ruby: No such file or directory
Macgyver2:
taresaco@taresa.com [~]# cd /usr/local/bin/ruby
-bash: cd: /usr/local/bin/ruby: No such file or directory
It's been too long since I've edited a shell.
I'll try editing my .bashes now. Thanks guys! I'll post what happens.
Taresa,
If you're getting: "/usr/local/bin/ruby: No such file or directory" then either ruby isn't there or there's some sort of privelages type situation going on. Sounds like you're going to need BH to doublecheck the location for you.
--DrSuSE