本文的目的是尽可能浅显的介绍Ruby + Passenger的使用。如果想深入了解Passenger,可参考后续相关章节。
本人通过有无Passenger启动Rubyf服务来入门Passenger
Ruby + Passenger 实验
无Passenger启动服务
-
准备Ruby程序
# 此项目是本人在github上提交的Ruby demo程序 git clone https://github.com/testcara/ROR_Blog.git
-
安装Gem包
# check the Gemfile and install the Gems # enter the dir cd ROR_Blog # confirm whether it is has the 'passenger' cat Gemfile | grep -r -i 'passenger' # install packages without production mode bundle install --without production
-
直接启动服务
# start the service rails s # then open the http://localhost:3000 to check the main page of the application
-
验证进程
# check the ruby related process ps aux