Installing Ruby on Linux
The following are the steps that I performed to install ruby on my linux
machine. This same text is also available on http://linux-certification.blogspot....-on-linux.html I went to http://www.ruby-lang.org/en/downloads/ There I found out a section with the heading Ruby Source Code I pick the url of the link for the file using the right click and choosing the 'copy link location' in my firefox. Then I went to the shell on my linux and put the following command shell> wget ftp://ftp.ruby-lang.org/pub/ruby/1.8...8.7-p72.tar.gz This downloaded the ruby source code to my root directory. I extracted the file using the following command shell> tar -xvf ruby-1.8.7-p72.tar.gz This command extracted the source archieve to ruby-1.8.7-p72 directory. Then I enter into this ruby-1.8.7-p72 directory and executed the following command shell> ./configure This is actually not a command rather a script, that is run to check the required configurations for the installation purposes. At the successful run of this script I executed the following command shell> make This make command compiled the code. At the end of the make command I executed the following command shell> make install This make install command installed the ruby and placed the ruby files in appropriate folders. Thats all to what I did for installing ruby on a linux machine. You can confirm your ruby installation by using the following command shell> ruby -v |
You do know you could have just used your Package Manager? If you are using one of the buntu's from the terminal sudo apt-get install ruby
|
But I am not running Ubunto. I think this apt is available for Debian flavors. Can you give me a command to check my flavor for the operating system? Thanks
|
Whatever distro you're using, Ruby will be available without compiling it yourself.
|
In fact I have my system at some data center. I ran ruby command which gave me unknown command message, therefore I get on to installing it myself. Thanks
My system is this Linux version 2.6.21-1.3194.fc7 |
I wanted to download ruby for Redhat Linux. But there is no tar file avaiable on this link http://www.ruby-lang.org/en/downloads/ anymore...
|
Learn how to use your disto's package manager. Every linux distro will have Ruby packages pre-built for your system.
- |
If everything went well terminal should read:
[root@localhost ruby-1.8.7-p72]#./ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux] Using a live CD pclos Though, synaptic package manager is way easier |
Installing from the package manager is all well and good as long as it has recent packages. Since RHEL 5's latest Ruby is 1.8.5 it's pretty near impossible to use any of the current gems with it. So it's useful to be able to install from source; though if you're using RHEL you probably don't want to do that anyway... use Fedora. Wouldn't be surprised if the same thing were a problem on stable Debian.
|
All times are GMT -5. The time now is 06:04 PM. |