Ron Green wrote:
Her are the instructions for 1.8.6. How do I modify this for 1.8.7?
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz
tar xzvf ruby-1.8.6-p111.tar.gz
cd ruby-1.8.6-p111
./configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1
make
sudo make install
cd ..
Well, let's take it step-by-step...
Use your browser to navigate to www.ruby-lang.org. Download ruby-1.8.7.tar.gz to your home directory.
We can tell by looking at the file suffixes that ruby-1.8.7.tar.gz is a file created by the tar(1) command and then zipped by the gzip(1) command. You can find out more about these commands by entering "man tar" and "man gzip" at the command line, or searching for "man tar" and "man gzip" with Google. The command
tar xvzf <filename>
uses the x, v, z, and f options. These options tell tar to eXtract Verbosely a gZipped File named <filename>. Since you downloaded ruby-1.8.7.tar.gz, then you'll use the command
tar xvzf ruby-1.8.7.tar.gz
This command will create a directory named 'ruby-1.8.7' and store within that directory all the files in the ruby-1.8.7 distribution. Make that directory the current directory:
cd ruby-1.8.7
Within that directory is a shell script named 'configure'. You can get help about using configure by entering
./configure --help
The configure script has a lot of options, some of which are very interesting and bear studying. (Hint: --enable-install-doc.) Determine the set of options you want to use and run the configure script again. Note that the configure script uses the --prefix option to determine where to install Ruby, and the default value of --prefix is /usr/local.
./configure --enable-shared --enable-pthread ...or whatever...
If you get any error messages, correct the problems and run configure again. Probably you won't, but it pays to check. After the configure script runs successfully, run make(1)
make
Again, watch for errors. If you get any errors, correct them. Probably they'll be caused by some configuration problem. After make completes successfully, run "make install". If you've used the default --prefix option, and you don't already have permission to write into /usr/local, then you'll have to use sudo(8) (or su(1), or some other mechanism) to get permission.
sudo make install
After "make install" has run successfully and you've confirmed that Ruby is installed to your satisfaction you can delete the ruby-1.8.7 directory. Don't do this immediately, because if you want to change something you can just run the configure script, make, and make install again. (However, if you decide to change the installation directory remember that you'll have to manually uninstall Ruby from /usr/local, or wherever you previously installed it.)
You may also find the "make test", "make clean", and "make distclean" commands useful, but I'll leave it to you to explore what they do.
Now make sure that /usr/local/bin (or, if you specified some other directory $prefix with the --prefix option, $prefix/bin) precedes /usr/bin in your PATH environment variable. You can do this temporarily in the current shell with the export(1) command:
export PATH=/usr/local/bin:$PATH
To set this permanently put the export command in your .profile or some other initialization file appropriate for your shell.
Verify that you're getting Ruby 1.8.7:
ruby -v
···
--
RMagick: http://rmagick.rubyforge.org/
RMagick 2: http://rmagick.rubyforge.org/rmagick2.html