grokdebuggera安装配置

grokdebugger

Author : Janloong Do_O

本地化环境搭建

ruby环境安装

tar zxf ruby-2.1.7.tar.gz
cd 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工具安装

tar zxf rubygems-2.6.2.tgz
cd rubygems-2.6.2
ruby setup.rb

替换官方源

gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
gem sources -l

Grokbug的安装

mkdir /usr/local/grokbug
cd /usr/local/grokbug
wget https://codeload.github.com/nickethier/grokdebug/zip/master
unzip master
mv grokdebug-master/* .
rm -rf grokdebug-master/

Ruby组件安装(以下组件都对版本有相应的要求)

查看缺少的组件
ruby config.ru

就会提示组件及对应的版本
gem install bundler
gem install cabin -v=0.5.0
gem install haml -v=3.1.7
gem install jls-grok -v=0.10.10
gem install json -v=1.7.5
gem install kgio -v=2.8.0
gem install rack -v=1.4.1
gem install rack-protection -v=1.2.0
gem install raindrops -v=0.11.0
gem install shotgun -v=0.9
gem install tilt -v=1.3.3
gem install sinatra -v=1.3.3
gem install unicorn -v=4.6.3

启动服务

nohup bundle exec unicorn -p 8080 -c ./unicorn &

替换google的jquery源

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

你可能感兴趣的:(tools)