almost 4 years ago

Ruby On Rails at Linode Ubuntu 13.10 裝機實務
參考連結:
https://github.com/rocodev/guides/wiki/setup-production-development

備註:
Bundler
官方slogan: The best way to manage a Ruby application's gems
管理ruby gem的gem,也就是之後常用到的bundle指令

XML parser
顧名思義,爬XML資料的Gem

Nokogiri
用來爬網頁html和css資料的ruby gem

Passenger
A modern web server and application server for Ruby, Python and Node.js, optimized for performance, low memory usage and ease of use.
搭配Install nginx安裝,會幫我們裝上最合適的nginx環境

imagemagick

在server中下載檔案的方式是使用wget "file_link"
下載完後用tar解壓縮
安裝imagemagick的官方教學如下:
http://www.imagemagick.org/script/install-source.php#unix

[ ./configure | make |sudo make install ]則是自己compile原始擋安裝的一種方法,需要再研究

rmagick
imagemagick針對ruby出的官方gem

setup a script to control Nginx
讓passenger管理我們的nginx環境

set up nginx.conf
server name若沒domain就設ip位置

Add the SSH key to GitHub
這裡要補充一點
除了將公鑰貼到deply key之外,也需要在remote主機實行git authorize
authorize步驟可以參考git官方教學
https://help.github.com/articles/generating-ssh-keys

Set up authorized keys for developers
這步驟是要將本機的公鑰貼在server

Set up Capistrano

production:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: mysql #看使用哪個database

  pool: 5               #還不知道是什麼意思

  username: root     #預設使用root不要手殘亂改

  password: '1xsedqwdqd'
Gemfile
group :development do
  gem "capistrano", "2.15.4"
  gem "capistrano-ext"
  gem 'capistrano-unicorn', :require => false
  gem "cape"
end
← 讓Model接收不存在的Attributes git-ignore →
 
comments powered by Disqus