简体   繁体   English

rbenv rehash给我的权限被拒绝@ rb_sysopen

[英]rbenv rehash gives me Permission denied @ rb_sysopen

After upgrading to Rails 4.0.4 and Ruby 2.1.1, i have permission problems with rbenv rehash. 升级到Rails 4.0.4和Ruby 2.1.1之后,我遇到了rbenv rehash的权限问题。 I tried bundler install to 1.5.3. 我尝试将bundler安装到1.5.3。 Ok. 好。 But still no. 但是仍然没有。 bashrc (Ubuntu 13.04) is fine, that is, as before. bashrc(Ubuntu 13.04)很好,就是和以前一样。 ruby -v shows the proper versions of global and local Ruby, as does rails -v. ruby -v和rails -v一样,显示全局和本地Ruby的正确版本。 Only 'rehash' seems to be the problem. 只有“重新哈希”似乎是问题所在。

.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:187:in `initialize': Permission denied @ rb_sysopen

Try running the server as a root. 尝试以根用户身份运行服务器。

sudo -s 须藤-s

rails s 滑轨

Change the owner of the dependency files: 更改依赖性文件的所有者:

sudo chown -R USERNAME /.rvm/

And then change owner of the project file: 然后更改项目文件的所有者:

sudo chown -R USERNAME /var/www/PROJECTFILE 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM