Yesterday I installed Ubuntu7.10 on my machine and set up the ROR platform. As I am a new Linux user, I have made many detours in compiling and installing ruby from source, so I will write it down for future use. Because Ubuntu7.10 does not support csource compilation after gcc is installed by default, to compile ruby from source, you must first install build-essential. Run the following command to install sudoapt-getinstallbuild-e from the source:
Yesterday I installed Ubuntu 7.10 on my machine and set up the ROR platform. As I am a new Linux user, I have made many detours in compiling and installing ruby from source, so I will write it down for future use.
Because the gcc after Ubuntu 7.10 is installed by default cannot compile c source, to compile ruby from source, you must first install build-essential.
Run the following command to install the SDK from the source:
Sudo apt-get install build-essential
Decompress the downloaded ruby source package.
Tar xvf ruby-1.8.6-p110.tar.bz2
Enter the ruby-1.8.6-p110 directory after decompression:
Cd ruby-1.8.6-p110
Configure :( "prefix" --- specifies to install to/opt/ruby, "-- enable-install-doc" specifies to install doc at the same time; otherwise, ri cannot be used in the future)
Sudo./configure -- prefix =/opt/ruby -- enable-install-doc
Make & install:
Sudo make
Sudo make install
Add ruby to the system PATH and write the following code to/etc/profile (and execute it in shell ):
Export PATH = $ PATH:/opt/ruby/bin
Install ruby SSL (if you do not install the later gem I rails, the system will prompt that SSL is missing ):
Switch to the root user: sudo-I
Go to the: cd ruby-1.8.6-p110/ext/openssl just extracted from source
Ruby extconf. rb
Make
Make install
Install rubygems-0.9.5:
Decompress the package and enter the directory for execution.
Ruby steup. rb
Install rails:
Gem I rails