I trying to deploy rails app in CentOS 6.3 for 3 days, and I had no success until now. I want to use rbenv, but I am getting these errors:
I created a new user 'deployer' and installed rbenv using it. Logout and Login again. When I log in, I get this error:
-bash: /home/deployer/.rbenv/bin/rbenv: Permission denied
If I install rbenv using root user, It loads rbenv after install, but the error is when I try install ruby:
$ rbenv install 1.9.3-p125
Downloading yaml-0.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b
Installing yaml-0.1.4...
BUILD FAILED
Inspect or clean up the working tree at /tmp/ruby-build.20121214131627.11110
Results logged to /tmp/ruby-build.20121214131627.11110.log
Last 10 log lines:
yaml-0.1.4/win32/vs2008/run_parser.vcproj
yaml-0.1.4/win32/vs2008/yaml.vcproj
yaml-0.1.4/win32/vs2008/test_version.vcproj
yaml-0.1.4/win32/vs2008/run_emitter.vcproj
yaml-0.1.4/win32/vs2008/example_reformatter.vcproj
yaml-0.1.4/win32/vs2008/run_loader.vcproj
yaml-0.1.4/win32/vs2008/yamldll.vcproj
yaml-0.1.4/win32/config.h
/tmp/ruby-build.20121214131627.11110/yaml-0.1.4 /tmp/ruby-build.20121214131627.11110 ~
/root/.rbenv/plugins/ruby-build/bin/ruby-build: line 321: ./configure: Permission denied
EDIT
Permissions of rbenv installed by deployer:
drwxr-xr-x. 8 deployer deployer 4096 Dec 14 13:11 .rbenv
I was getting this error because folder was mounted with noexec
option.
Same solution of this thread: https://stackoverflow.com/a/13973592/740394