gem命令的共享主机上的权限错误

时间:2016-08-17 07:10:19

标签: ruby-on-rails ruby sass

每次尝试使用gem install sass(或gem install任何内容时,我都会收到错误。

/usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91:in `read': Permission denied - /usr/lib/ruby/gems/1.8/specifications/passenger-3.0.18.gemspec (Errno::EACCES)
    from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91:in `load_specification'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:153:in `load_gems_in'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:152:in `each'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:152:in `load_gems_in'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:149:in `reverse_each'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:149:in `load_gems_in'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:345:in `refresh!'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:78:in `from_gems_in'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:58:in `from_installed_gems'
    from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:883:in `source_index'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:81:in `init_gemspecs'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:13:in `initialize'
    from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:841:in `new'
    from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:841:in `searcher'
    from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:840:in `synchronize'
    from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:840:in `searcher'
    from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:479:in `find_files'
    from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:983:in `load_plugins'
    from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1139
    from /usr/bin/gem:8:in `require'
    from /usr/bin/gem:8

因为这是共享主机,所以我无法访问/ usr / lib / ruby​​。我联系了a2hosting,但他们告诉我他们不支持Ruby on Rails并在此发布。所以我想这表明我自己有办法解决这个问题? a2hosting CPanel上有一个RubyGems应用程序,但它也不起作用:

CPanel doesn't work when I try to install SASS

我怀疑这是因为它只使用我使用的相同命令,因此会抛出相同的错误。

但是我在服务器上安装了rvm。也许有一种解决方法使用它?

0 个答案:

没有答案