[英]cannot install gem ERROR: While executing gem … (Errno::EACCES)
I'm trying to install gem 'passenger' on my project to use nginx. 我正在尝试在项目上安装gem'passenger'以使用nginx。 But when I do
但是当我这样做
$ gem install passenger
error comes out like, 错误出来,
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /home/ubuntu/.rvm/gems/ruby-2.2.2@rails-devise/gems/passenger-5.0.22/.editorconfig
I found that this error is related to my version of ruby and rails. 我发现此错误与我的Ruby和Rails版本有关。 Actually this project started from
ruby version 2.2.2
, and rails version 4.2.5
. 实际上,这个项目从
ruby version 2.2.2
和rails version 4.2.5
。 But my ubuntu already has ruby version 2.2.1
, and rails version 4.2.4
, this means I installed ruby and rails using rvm at the /home/ubuntu
. 但是我的ubuntu已经有
ruby version 2.2.1
和rails version 4.2.4
,这意味着我在/home/ubuntu
使用rvm安装了ruby和rails。
So I was trying to match the version of my envirnment and my project by reinstalling ruby and rails, using rvm install ruby-2.2.2
, gem install rails --version=4.2.5
. 所以我试图通过
rvm install ruby-2.2.2
, gem install rails --version=4.2.5
重新安装ruby和rails来匹配我的环境和项目的gem install rails --version=4.2.5
。 But I still get same error. 但是我仍然遇到同样的错误。
What I want to do is making my envirnment works fine.(installing gem, matching version correctly using rvm or etc.) Any ideas or document that I can read? 我要做的是使我的环境正常运行。(安装gem,使用rvm等正确地匹配版本)。我能阅读的任何想法或文档吗? As you can see, I'm not good at Linux.
如您所见,我不太擅长Linux。 So if you have any recommendations, please let me know.
因此,如果您有任何建议,请告诉我。 Thanks.
谢谢。
This issue is not related to version of ruby or rails. 此问题与红宝石或铁轨的版本无关。 Could you tell me as which user are you trying to run this command by
whoami
? 您能告诉我您是谁试图通过
whoami
运行此命令吗?
The actual problem seem to be that the file /home/ubuntu/.rvm/gems/ruby-2.2.2@rails-devise/gems/passenger-5.0.22/.editorconfig
is not accessible by the current user. 实际的问题似乎是当前用户无法访问文件
/home/ubuntu/.rvm/gems/ruby-2.2.2@rails-devise/gems/passenger-5.0.22/.editorconfig
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.