Rbenv permission denied issue

2.4k Views Asked by At

I have trouble getting my Rails app running after I deployed this to my DO droplet. I deployed (and installed everything including rbenv) following this guide. Rbenv seems to be installed properly but app is not running and nginx error log says "cannot execute /root/.rbenv/shims/ruby permission denied (13)"

I can not get the sense of this error, hope anyone can help with that.

1

There are 1 best solutions below

3
On

Looks like rbenv's installed under root. It should probably be installed under your (or your app user's) home directory, in this case for the user named 'deploy.'

This Passenger configuration line from nginx.conf shows where it's expected to live:

/home/deploy/.rbenv/shims/ruby

So you should probably (re)install rbenv as/under 'deploy.'