~$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
Note: I dont want to set the ruby path using RVM
~$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
Note: I dont want to set the ruby path using RVM
How did you install your ruby? apt-get install ? I highly recommend using RVM it will make your life easier. But in General you can set up your Environment variables in Linux in a standard way:
To display current environment:
set
You can modify each environmental or system variable using the export command. Set the PATH environment variable to include the directory where you installed the bin directory with perl and shell scripts:
export PATH=${PATH}:/home/username/bin
OR
export PATH=${PATH}:${HOME}/bin
You will need to check out the path of your Ruby file using
which ruby
Then to set it up:
export PATH=${PATH}:/Users/info/.rvm/rubies/ruby-2.0.0-p353/bin
The ~/.bash_profile ($HOME/.bash_profile) or ~/.prfile file is executed when you login using console or remotely using ssh. Add the path to ~/.bash_profile file