|
Installing Ruby on SUSE Linux 10.1 |
|
|
|
|
Written by Chintan Rajyaguru
|
|
Sunday, 04 February 2007 |
|
I took the first step to familiarize myself with Ruby and Rails some time ago. In fact, I blogged about this once. As part of my efforts to gradually move to linux, I decided to continue Ruby and Rails development on my SUSE Linux 10.1 install. Obviously the first step was to install Ruby so today, I am sharing my experience installing Ruby. First of all, check if you already have Ruby installed. Just type ruby -version on command prompt. If Ruby version is displayed, you already have Ruby, if not, install it. Installation is easy, you can build from source:
- Go to http://www/ruby-lang.org and click on Downloads link
- Select the stable release in the Ruby Source Code section - as of this writing Ruby 1.8.5-p12, also available here, is stable
- Place the compressed file in user's home directory. You can go to your home directory using cd $HOME command
- Extract the compressed file e.g. tar xvfz ruby-1.8.5-p12.tar.gz, this will create a directory ruby-1.8.5-p12
- Change to the directory ruby-1.8.5-p12 and issue ./configure command
- At this point, if you don't have gcc package or other C compiler, you will get an error similar to "No appropriate C compiler found in path." If this happens, you have to install gcc package first:
- click on this link
- select Open with Zen installer
- supply root password when asked
- if there are any unresolved dependencies, your default rpm installer should recognize them and get them automatically
- if for some reason, gcc installation doesn't go smooth, fix the it first before proceeding
- Now, ./configure command in /home/<username>/ruby-1.8.5-p12 should work
- Issue make command to build
- Run make install as root to install Ruby
- Run make install-doc as root to install Ruby documentation
- Test installation using ruby -v command. This should display something like ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-linux]
If you don't want to install from source, you can also find a precompiled rpm from places like http://www.rpmfind.net/. Just search for Ruby. For example, a precompiled rpm is available here. I did not install from a precompiled rpm so I don't know about gotchas if any.
Next time, I will talk about a pretty cool irb tool, ruby doc and rails.
|
| |
|
Last Updated ( Saturday, 17 February 2007 )
|