ROR31 体验
最近玩ROR了,以前接触过perl/PHP,感觉web前端的编程是需要很系统的设计,规划,编码和测试,尤其是当java大行其道的年代,但有了rails, 加上ruby, rest/dry, 这些使个人开发大型网络系统前端成为可能,即使包括后台的数据库,云计算,也不是完全没有机会.好,开始吧...
#release notes
http://railsapps.github.com/installing-rails-3-1.html
enabled featues:
ubuntu + Apache2 + passenger2nobstrusive Javascript/AJAXdevisepassengermysql2enum_columnwill_paginatel18njquery-rails
pre-install
ubuntu11.10
sudo apt-get install openssh-server libapache2-mod-auth-mysql mysql-server
<<skip>>sudo a2enmod ssl
sudo apt-get install g++ ruby1.8 rubygems rake irb ruby1.8-dev build-essential libopenssl-ruby imagemagick
apt-get install apache2 libapache2-mod-fcgid libfcgi-ruby1.8
#note:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
add below to ~/.bashrc
export PATH=$PATH:/var/lib/gems/1.8/bin/
and logout then login with bash shell.
<<<<<<<<<<<<<<<<<<<<<<<<<<<
sudo gem install rubygems-update
sudo update_rubygems
sudo gem update
sudo gem install rails
bundle install
sudo gem install passenger
sudo passenger-install-apache2-module
#note:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
in this step please fololwo the output instructions to install missing packages.
and then re-run
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
rake db:create
rake db:migrate
sudo gem install -y image_science
#reserved for server cluster
#passenger-install-nginx-module
#http://clarkware.com/blog/2007/02/24/file-upload-fu
#reference
#http://www.modrails.com/install.html
#http://www.howtoforge.com/ruby_on_rails_debian_etch_p2
#http://eragonj.hax4.in/blog/ror-passenger-apache.html
#http://izumi.plan99.net/blog/index.php/2008/03/31/benchmark-passenger-mod_rails-vs-mongrel-vs-thin/
#authentication
sudo gem install devise
bundle install
rails generate devise:install
rails generate devise User
rails generate devise:views
#devise
http://railscasts.com/episodes/209-introducing-devise
#install enum_column3
gem install enum_column3
#install sphinx
http://www.coreseek.cn/products-install/install_on_bsd_linux/
#instal javascript run time
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
#install auto_link support
sudo gem install rails_autolink
#about performance
我用apache2 自带的ab 测试可以有400个用户连接100个active相应时间为5秒
#upgrading to Ror3.2
https://rvm.beginrescueend.com/rvm/install/