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:
我试图在CentOS 6.3中部署rails app 3天,直到现在我都没有成功。我想使用rbenv,但我收到这些错误:
I created a new user 'deployer' and installed rbenv using it. Logout and Login again. When I log in, I get this error:
我创建了一个新用户'deployer'并使用它安装了rbenv。注销并再次登录。当我登录时,我收到此错误:
-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:
如果我使用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
EDIT
Permissions of rbenv installed by deployer:
部署者安装的rbenv权限:
drwxr-xr-x. 8 deployer deployer 4096 Dec 14 13:11 .rbenv
4 个解决方案
#1
0
First, check the prmissions and owner for /home/deployer/.rbenv
首先,检查/home/deployer/.rbenv的佣金和所有者
In second example, i think, you are running install under user. Try run it under root.
在第二个例子中,我认为,您正在用户下运行安装。尝试在root下运行它。
#2
0
Looks like ~/.rbenv was created by another user
看起来〜/ .rbenv是由另一个用户创建的
try
$ sudo chown -R deployer ~deployer/.rbenv
#3
0
Am getting the same error. I think yaml is the culprit here. if we can install ruby without yaml then install yaml later
我得到了同样的错误。我认为yaml是罪魁祸首。如果我们可以在没有yaml的情况下安装ruby,那么稍后再安装yaml
#4
-1
I was getting this error because folder was mounted with noexec
option.
我收到此错误,因为文件夹是使用noexec选项挂载的。
Same solution of this thread: https://*.com/a/13973592/740394
该线程的相同解决方案:https://*.com/a/13973592/740394
#1
0
First, check the prmissions and owner for /home/deployer/.rbenv
首先,检查/home/deployer/.rbenv的佣金和所有者
In second example, i think, you are running install under user. Try run it under root.
在第二个例子中,我认为,您正在用户下运行安装。尝试在root下运行它。
#2
0
Looks like ~/.rbenv was created by another user
看起来〜/ .rbenv是由另一个用户创建的
try
$ sudo chown -R deployer ~deployer/.rbenv
#3
0
Am getting the same error. I think yaml is the culprit here. if we can install ruby without yaml then install yaml later
我得到了同样的错误。我认为yaml是罪魁祸首。如果我们可以在没有yaml的情况下安装ruby,那么稍后再安装yaml
#4
-1
I was getting this error because folder was mounted with noexec
option.
我收到此错误,因为文件夹是使用noexec选项挂载的。
Same solution of this thread: https://*.com/a/13973592/740394
该线程的相同解决方案:https://*.com/a/13973592/740394