Skip to content

Installing Gem Fails With Permission Error #19

Closed
@sanssecours

Description

@sanssecours

👋 Hi,

first I would like to thank you for offering your great CI service for FLOSS software for free. It works really well and is quite fast too. After this round of well deserved praise 😊, it is probably time to write about the problem I noticed with some of the recent changes to the macOS images.

It seems like it is no longer possible to install Ruby gems with the Homebrew’s version of Ruby. I created a project that shows this problem here. As you can see in the log file, the command gem install fails with a file permission error:

#<Thread:0x00007fc9e9a8ebb0@/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/request_set.rb:168 run> terminated with exception (report_on_exception is true):
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems.rb:873:in `initialize': Permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/2.6.0/cache/ronn-0.7.3.gem (Errno::EACCES)
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems.rb:873:in `open'
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems.rb:873:in `write_binary'
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/remote_fetcher.rb:315:in `cache_update_path'
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/remote_fetcher.rb:159:in `download'
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/source.rb:206:in `download'
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/resolver/specification.rb:101:in `download'
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/request_set.rb:174:in `block (2 levels) in install'
#<Thread:0x00007fc9e9a8ef20@/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/request_set.rb:168 run> terminated with exception (report_on_exception is true):
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems.rb:873:in `initialize': Permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/2.6.0/cache/mustache-1.1.0.gem (Errno::EACCES)
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems.rb:873:in `open'
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems.rb:873:in `write_binary'
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/remote_fetcher.rb:315:in `cache_update_path'
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/remote_fetcher.rb:159:in `download'
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/source.rb:206:in `download'
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/resolver/specification.rb:101:in `download'
	from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/request_set.rb:174:in `block (2 levels) in install'
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/2.6.0/cache/mustache-1.1.0.gem

The installation even fails with this permission error if I use the option --user-install.

Another minor problem I noticed is the banner “High Sierra images were deprecated! Auto upgraded to mojave-xcode-11.2.1”. This message seems rather strange, since cirrus.yml already specifies a macOS Mojave image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions