First of all, indicate your ruby version.
rvm install 1.9.3 (if you don't already have one) Using rvm 1.9.3 (--default)
Then you need to:
gem install passenger cd / your gems dir (e.g. ~ / .rvm / gems / ruby-1.9.3-p0 / gems) / passenger / bin. / passenger -install-nginx-module
What about the destination directory? Everything for your decision:
if it is a developer / training computer - we recommend installing it in ~ / nginx
if it’s something like “production” - create a user for the web application, grant him rights, install rvm and all the environments for him, install nginx in the shared directory (/ opt / nginx) to access nginx from several accounts at the same time.
General rule: RVM and Rails (web application) are for one user => nginx can be for one user. Another way => global
source share