在带有nginx / passenger / rails的ubuntu 14.04的EC2上附带了nginx上的这个日志:
App 31063 stderr:* ERROR *:无法执行/ usr / local / lib / ruby: 许可被拒绝(13)
App 31065 stderr:/etc/profile.d/rbenv.sh:line 3:rbenv:command not not 发现nginx conf是:
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;
}
}
某人有什么亮点吗?感谢' S
答案 0 :(得分:2)
在终端
执行sudo chmod o+x "/root"
解决这个问题!
*错误* :无法执行/root/.rbenv/versions/2.2.3/bin/ruby Phusion Passenger Permission denied(13) Phusion Passenger nginx centos
http://oki2a24.com/2014/02/08/try-to-install-ruby-and-redmine/
答案 1 :(得分:1)
passenger_ruby
应该指向ruby命令本身。你的似乎指向一个目录/usr/local/lib/ruby/
(部分基于passenger_root路径)。
https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_ruby
尝试将passenger_ruby
更改为/usr/bin/ruby
,或改变您的路径。 "哪个红宝石"会给你路径,如果它在你的PATH
环境变量中。