sudo gem install passenger
sudo passenger-install-nginx-module
This launches the interactive Passenger installation. Just follow the instructions! The procedure automatically detects the OS and check all requirements. If a potential problem is found, it provides a very detailed information about its resolution.
Check also out the User Guide for details and more advanced configuration options.