sudo apt-get upgrade
然後安裝必要的軟體
sudo apt-get install curl build-essential zlib1g-dev libssl-dev libreadline-dev xclip git
echo "alias clipboard='clip -sel clip'" >> ~/.bashrc
然後正式的開始,首先要有版本管理的軟體,所以安裝 rbenv
RBENV
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo "export PATH='$HOME/.rbenv/bin:$PATH'" >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
然後裝 ruby-build
mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
git clone git://github.com/sstephenson/ruby-build.git
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
緊接著立刻開始裝 Ruby 跟 Rails 。(版本請按照自己的需求來安裝 我裝的是 2.3.2)
rbenv install 2.3.2
rbenv rehash
rbenv global 2.3.2
ruby -v
gem install bundler rails
rbenv rehash
rails -v
PASSENGER
$gem install passenger $sudo apt-get install libcurl4-openssl-dev #安装SSL gem #passenger官方安装指南(http://www.modrails.com/install.html)的提示,开始安装: $rvmsudo passenger-install-nginx-module #都是默认选择,选择1(ruby),目錄可以依照自己喜歡的更換,預設在: /opt/nginx/
最後要記得去修改
/opt/nginx/conf/nginx.conf
指定到正確的路徑,就大功告成了!!
沒有留言:
張貼留言