tar zxvf ruby-2.1.7.tar.gz -C /usr/local/ cd /usr/local/ruby-2.1.7 ./configure --prefix=/usr/local/ruby2.1.7 make && make install echo 'export PATH=/usr/local/ruby2.1.7/bin:$PATH'>>/etc/profile source /etc/profile
# 安装rubygems工具 [https://rubygems.org/pages/download](https://rubygems.org/pages/download) wget https://rubygems.org/rubygems/rubygems-3.0.3.tgz tar zxvf rubygems-3.0.3.tgz -C /usr/local/ cd /usr/local/rubygems-3.0.3/ ruby setup.rb
#替换Google的jquery源,将使用google的源替换为国内的新浪源 cd views sed -i 's#//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js#//lib.sinaapp.com/js/jquery/1.8.1/jquery.min.js#g' index.haml sed -i 's#//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js#//lib.sinaapp.com/js/jquery-ui/1.9.2/jquery-ui.min.js#g' index.haml sed -i 's#//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js#//lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js#g' patterns.haml sed -i 's#//ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/themes/ui-lightness/jquery-ui.css#//lib.sinaapp.com/js/jquery-ui/1.9.0/themes/ui-lightness/jquery-ui.css#g' layout.haml sed -i 's#//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js#//lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js#g' discover.haml