简体   繁体   English

无法安装gem错误:执行gem…(Errno :: EACCES)

[英]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.2rails 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.1rails 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.2gem 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.

相关问题 gem install rails ERROR:执行gem时...(Errno :: EACCES) - gem install rails ERROR: While executing gem … (Errno::EACCES) 执行gem时出错(Errno :: EACCES) - error while executing gem (Errno::EACCES) 错误:执行gem…(Errno :: EACCES)时,另一台计算机? - ERROR: While executing gem … (Errno::EACCES), another computer? 错误:执行gem时...(Errno :: EISDIR)gem install rails - ERROR: While executing gem … (Errno::EISDIR) gem install rails 错误:安装nokogiri -v'1.5.6'时执行gem…(Errno :: EACCES)时,权限被拒绝 - ERROR: While executing gem … (Errno::EACCES) while installing nokogiri -v '1.5.6' Permission denied Sidekiq安装:错误:执行gem…(NameError)时未初始化的常量RDoc - Sidekiq install: ERROR: While executing gem … (NameError) uninitialized constant RDoc 执行gem install rails时如何解决错误 - How to resolve error while executing gem install rails 在执行gem时出现……(Gem :: RemoteFetcher :: FetchError)尝试安装Rails时出现503错误 - Getting a While executing gem … (Gem::RemoteFetcher::FetchError) 503 error when attempting to install rails 错误:执行gem时...(Errno :: EINVAL)参数无效 - ./ActionDispatch/Routing/Mapper/Scoping/: - ERROR: While executing gem … (Errno::EINVAL) Invalid argument - ./ActionDispatch/Routing/Mapper/Scoping/: 执行gem(Errno :: EINVAL)时出现Rails状态机错误 - Rails state machine error when executing gem (Errno::EINVAL)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM