[J]Ruby自编译安装

#直接Copy并粘贴到控制台
#安装Ruby1.9.1-p378
wget ftp://ftp.ruby-lang.org:21//pub/ruby/ruby-1.9-stable.tar.gz
tar -zxvf ruby-1.9-stable.tar.gz
cd ruby-1.9.1-p378/
./configure --prefix=/usr/local/ruby-1.9.1-p378
make && make install
echo export PATH=/usr/local/ruby-1.9.1-p378/bin:$PATH >> ~/.bash_profile
export PATH=/usr/local/ruby-1.9.1-p378/bin:$PATH
echo Ruby Installed
cd ..
#安装Gem
#wget http://files.rubyforge.vm.bytemark.co.uk/rubygems/rubygems-1.3.6.tgz
#tar -zxvf rubygems-1.3.6.tgz
#cd rubygems-1.3.6
#ruby setup.rb
#echo GEM Installed
#cd ..
#安装rubygems(以前的gemcutter)
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.6.tgz
tar -zxvf rubygems-1.3.6.tgz 
cd rubygems-1.3.6
sudo ruby setup.rb
echo RUBYGEM Installed
cd ..
#安装其它gem
gem i rails --no-rdoc --no-ri
gem i sinatra --no-rdoc --no-ri
gem i thin --no-rdoc --no-ri
gem i uuid --no-rdoc --no-ri
echo Task Over
#Over



wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.gz
tar -zxvf ruby-1.8.7.tar.gz
cd ruby-1.8.7
./configure --prefix=/usr/local/ruby-1.8.7
make && make install
echo export PATH=/usr/local/ruby-1.8.7/bin:$PATH >> ~/.bash_profile
export PATH=/usr/local/ruby-1.8.7/bin:$PATH
cd ..



#安装jruby-1.4.0
cd ~
wget http://jruby.kenai.com/downloads/1.4.0/jruby-bin-1.4.0.tar.gz
tar -zxvf jruby-bin-1.4.0.tar.gz 
mv jruby-1.4.0/ /usr/local/
export PATH=/usr/local/jruby-1.4.0/bin/:$PATH
echo export PATH=/usr/local/jruby-1.4.0/bin/:$PATH >> ~/.bash_profile

你可能感兴趣的:(J#,Ruby,rubygems,jruby,Sinatra)