First, we will introduce the environment I use. My Linux is installed on a virtual machine, VMwareWorkstation5.5, and the installation is Fedora8. The iso file of Fedora contains the ruby rpm package, but the rpm package that comes with it cannot meet our needs for installing Rails. Therefore, we need to download the rubybench installation package at http://www.ruby-lang.org/en/. the download is the 1.8.6source code. Decompress the package and use
First, let me introduce the environment I use. I installed my Linux system on a virtual machine, VMware Workstation 5.5, and Fedora 8. The iso file of Fedora contains the ruby rpm package, but the rpm package that comes with it cannot meet our needs for installing Rails. Therefore, we need to download the ruby installation package from http://www.ruby-lang.org/en/. the downloaded source code is 1.8.6. Decompress the package and run the tar command to decompress the package.
Tar xvf file name
After decompression, there will be an additional ruby-1.8.6 directory under the current directory, which is the ruby source file. Of course, you need to compile and then install it. Run the cd command to enter the directory.
Cd ruby-1.8.6
After entering the ruby-1.8.6 directory, you can perform the following steps to install it:
1. Enter./configure in the terminal, and press enter to wait.
2. Execute the make command, enter make in the terminal, and press enter to wait.
3. test whether the make command is successfully executed. Enter make test on the terminal. If successful is displayed, the make command is successfully executed.
4. Enter the make install-all command in the terminal to install ruby
Okay, we have installed ruby. Next we will start to install rubygems.
First of all need to download rubygems, you can go to http://rubyforge.org/frs? Group_id = 126 download rubygems. Download a compressed package, decompress the package, locate the working directory of the terminal to the decompressed folder, enter the ruby setup. rb command, and install rubygems.
After rubygems is installed, you can use rubygems to install rails. Enter the command in the terminal
Gem install rails -- include-dependencies
After the preceding commands are executed, you have successfully installed ruby and rails.