For nginx server try somthing like :
location @passenger { passenger_enabled on; passenger_app_env production; passenger_set_cgi_param GEM_PATH "/home/user/.rbenv/versions/1.8.7-p370/gemsets/myapp"; }
For nginx server try somthing like :