Skip to content

Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/bigdecimal-1.2.5 #7732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pendolf opened this issue Dec 2, 2014 · 4 comments

Comments

@pendolf
Copy link

pendolf commented Dec 2, 2014

Mac OS x 10.10
ruby: 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
gem: 2.4.3

$ rvm list
   ruby-1.9.3-p551 [ x86_64 ]
=* ruby-2.1.5 [ x86_64 ]
$ brew cask
Error: Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/bigdecimal-1.2.5
@rolandwalker
Copy link
Contributor

Hi!

You definitely have a permissions problem, but it doesn't look related to any of our code. You should try running brew doctor, and manually examining the permissions on the reported files above.

I'm not sure how rvm may relate to your issues as I don't use it.

@pendolf
Copy link
Author

pendolf commented Dec 4, 2014

Hello.

I dont have any problems with brew.

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: /usr/local/share/python is not needed in PATH.
Formerly homebrew put Python scripts you installed via `pip` or `pip3`
(or `easy_install`) into that directory above but now it can be removed
from your PATH variable.
Python scripts will now install into /usr/local/bin.
You can delete anything, except 'Extras', from the /usr/local/share/python
(and /usr/local/share/python3) dir and install affected Python packages
anew with `pip install --upgrade`.

This is my brew configuration

$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: eae03b3dd596c039a676e785509b2c6d6ddb9a2b
Last commit: 6 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.10.1-x86_64
Xcode: 6.1.1
CLT: 6.1.1.0.1.1416017670
Clang: 6.0 build 600
X11: N/A
System Ruby: 2.0.0-481
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/pendolf/.rvm/rubies/ruby-2.1.5/bin/ruby

Why "brew cask" try to install bigdecimal-1.2.5 (gem) at system path?
Where I can change PATH, for example to /Users/pendolf/.rvm/gems/ruby-2.1.5/gems/?

@rolandwalker
Copy link
Contributor

We don't try to install bigdecimal. Instead, it sounds like one of our dependencies uses bigdecimal, and that the bigdecimal gem on your system has bad permissions on its files.

We don't have control over which Ruby gets invoked: that is determined by the parent brew command. Homebrew is probably ignoring your rvm setup and using the system Ruby (the path is given below). You might be able to manipulate the $GEM_PATH Ruby variable to control which gems get used, but that is firstly just a general Ruby question, and secondly, it would only hide that something is wrong on your system.

Here is a list of all the non-Homebrew dependencies in our project. One of the following commands should fail, which should help lead you to your problem:

$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'base64'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'cgi'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'checksum'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'date'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'digest'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'forwardable'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'open3'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'optparse'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'pathname'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'rubygems'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'set'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'shellwords'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'stringio'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'strscan'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'tmpdir'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'uri'"
$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -e "require 'yaml'"

The path /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/bigdecimal-1.2.5 is pointed out in your error: you should try ls -la to inspect the broken files, and chmod or chown to repair the permissions.

Unfortunately, there is nothing we can change in our code to address local permissions problems. A working system Ruby is just a requirement of the software.

@pendolf
Copy link
Author

pendolf commented Feb 27, 2015

I found the solution:
rm -rf /Library/Ruby/Gems/2.0.0 and
gem update --system

@pendolf pendolf closed this as completed Feb 27, 2015
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants