我尝试在 CentOS 6.3 中部署 rails 应用程序 3 天,直到现在我都没有成功。我想使用 rbenv,但出现以下错误:
我创建了一个新用户“部署者”并使用它安装了 rbenv。注销并再次登录。当我登录时,我收到此错误:
-bash: /home/deployer/.rbenv/bin/rbenv: Permission denied
如果我使用 root 用户安装 rbenv,它会在安装后加载 rbenv,但是当我尝试安装 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
编辑
部署者安装的rbenv权限:
drwxr-xr-x. 8 deployer deployer 4096 Dec 14 13:11 .rbenv