#之后修改源配置
sudo vi /etc/apt/sources.list
#注意,以下是8.04版本的
#按cG键,删除所有内容,按ctrl+shift+v粘贴以下内容
deb http://mirrors.163.com/ubuntu/ hardy main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ hardy-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ hardy-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ hardy-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ hardy-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ hardy main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ hardy-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ hardy-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ hardy-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ hardy-backports main restricted universe multiverse
#粘贴后按Esc键,再输入:wq,注意是打冒号wq,保存并退出vi
#更新源
sudo apt-get update
#服务器、开发机都需要以下依赖库
sudo apt-get install ruby libopenssl-ruby1.8 mysql-server mysql-client libmysqlclient15-dev git-core imagemagick nginx ruby1.8-dev
#手动安装 rubygems
wget http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz tar -xvf rubygems-1.3.4.tgz cd rubygems-1.3.4 sudo ruby setup.rb --no-ri --no-rdoc
#添加gem源
gem sources -a http://gems.github.com gem sources -a http://rubygems.org #敲上面命令如果说找不到gem命令,先执行 sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
#安装webrat的依赖库
sudo apt-get install libxslt1-dev libxml2-dev
#安装rails及其他库
sudo gem install rails --version='2.3.2' --no-ri --no-rdoc sudo gem install rspec hoe haml thoughtbot-paperclip mislav-will_paginate mysql mongrel mongrel_cluster aslakhellesoy-cucumber webrat javan-whenever ferret acts_as_ferret rmmseg --no-ri --no-rdoc sudo gem install handsoap httpclient searchlogic awesome-print -no-ri --no-rdoc
#开发机额外安装(xosd-bin及以后的内容都是autotest所需)
sudo apt-get install irb ctags xosd-bin ruby-gnome2 libnotify-dev sudo gem install rspec-rails ZenTest diff-lcs thoughtbot-factory_girl --no-ri --no-rdoc
#安装日历插件(已安装至项目的plugin目录下)
#sudo gem install calendar_date_select --no-ri --no-rdoc
为支持测试结果的提示,需要手动安装ruby-libnotify
#需先安装ruby-gnome2 libnotify-dev wget http://rubyforge.org/frs/download.php/27134/ruby-libnotify-0.3.3.tar.bz2 #进入ruby-libnotify-0.3.3.tar.bz2所在目录 tar -vxf ruby-libnotify-0.3.3.tar.bz2 #参考INSTALL文件执行: cd ruby-libnotify-0.3.3 ruby extconf.rb sudo make && sudo make install #加入autotest运行结果在右上角任务栏的提示效果图标 git clone git://github.com/saberma/autotest_images.git ~/.autotest_images
Sphinx
1. sudo apt-get install libtool 2. sudo apt-get install g++ 3. 编译libmmseg: cd mmseg-0.7.3 ./configure make make install 4 cd sphinx-0.9.8-rc2 ./configure make make install 5. 中文分词可以看这篇文章:http://www.iteye.com/topic/200065 6. 使用rails插件ultrasphinx来连接sphinx