0

On a EC2 with ubuntu 14.04 with nginx/passenger/rails came with this log on nginx:

App 31063 stderr: * ERROR *: Cannot execute /usr/local/lib/ruby: Permission denied (13)

App 31065 stderr: /etc/profile.d/rbenv.sh: line 3: rbenv: command not found

nginx conf is:

worker_processes 1; error_log logs/error.log; events { worker_connections 1024; } http { passenger_root /usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.18; passenger_ruby /usr/local/lib/ruby; include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name teste.com; root /home/ubuntu/teste/current/public; passenger_enabled on; rails_env production; access_log logs/access.log; location ~ ^/(assets)/ { gzip_static on; expires max; add_header Cache-Control public; } error_page 500 502 503 504 /500.html; client_max_body_size 4G; keepalive_timeout 10; } } 

someone cloud give some light? thank's

1 Answer 1

1

You have not set passenger_ruby correctly.

 passenger_ruby /usr/local/lib/ruby; 

This is meant to be set to the Ruby binary itself. But you have set it to a directory.

Change it to the location of your ruby interpreter.

4
  • thank's @michael-hampton but show the same: ERROR ***: Cannot execute /usr/local/lib/ruby/2.2.0: Permission denied (13) Commented Sep 24, 2015 at 1:48
  • Again, that's a directory, not a copy of the ruby program. Commented Sep 24, 2015 at 1:49
  • but with which ruby show: /usr/local/bin/ruby so, i tried to find and did not find the ruby interpreter on ubuntu Commented Sep 24, 2015 at 2:09
  • /usr/local/bin/ruby would be correct, then. Commented Sep 24, 2015 at 2:10

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.