Ruby installation permissions

Hi, going through the installation steps, I am trying to update my Ruby 2.3.0 folder within the Library on my OS 10.13.6 , but keep getting permission errors. I have changed the Ruby folder to have Read & Write permissions, as well as sub folders. Below is the transcript from Terminal, what should I try next? Thanks

[Mark-Laptop:~] markbresler% gem update --system
Updating rubygems-update
Fetching: rubygems-update-3.1.2.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/bin directory.
[Mark-Laptop:~] markbresler% gem install ruby
Fetching: ruby-0.1.0.gem (100%)
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ dir_s_mkdir - /Library/Ruby/Gems/2.3.0
[Mark-Laptop:~] markbresler%

Comments

  • You might need to sudo this.

  • Hi,
    I took another try following the directions for the Starter project, this time using Xcode 11.5 running on OS 10.15.4, still get hung up in approximately the same step, here is the transcript:

    markbresler@Jacobs-MacBook-Pro-4 ~ % ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /opt/X11/bin in PATH, mode 040777
    Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in
    Bash. Please migrate to the following command:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

    ==> This script will install:
    /usr/local/bin/brew
    /usr/local/share/doc/homebrew
    /usr/local/share/man/man1/brew.1
    /usr/local/share/zsh/site-functions/_brew
    /usr/local/etc/bash_completion.d/brew
    /usr/local/Homebrew

    Press RETURN to continue or any other key to abort
    ==> Downloading and installing Homebrew...
    remote: Enumerating objects: 103, done.
    remote: Counting objects: 100% (103/103), done.
    remote: Compressing objects: 100% (5/5), done.
    remote: Total 122 (delta 98), reused 98 (delta 98), pack-reused 19
    Receiving objects: 100% (122/122), 39.98 KiB | 13.33 MiB/s, done.
    Resolving deltas: 100% (98/98), completed with 65 local objects.
    From https://github.com/Homebrew/brew
    * [new branch] dependabot/bundler/Library/Homebrew/connection_pool-2.2.3 -> origin/dependabot/bundler/Library/Homebrew/connection_pool-2.2.3
    8a5e32ccc..7db771be3 master -> origin/master
    HEAD is now at 7db771be3 Merge pull request #7677 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-0.85.0
    Updated 2 taps (homebrew/core and homebrew/cask).
    ==> New Formulae
    austin cassowary cloud-nuke packr
    ==> Updated Formulae
    acme flash libgr rav1e
    ( listing abreviated )
    meshcommander yourkit-java-profiler
    ==> Installation successful!

    ==> Next steps:

    • Run brew help to get started
    • Further documentation:
      https://docs.brew.sh
      markbresler@Jacobs-MacBook-Pro-4 ~ % git --version
      git version 2.21.1 (Apple Git-122.3)
      markbresler@Jacobs-MacBook-Pro-4 ~ % git --version
      git version 2.21.1 (Apple Git-122.3)
      markbresler@Jacobs-MacBook-Pro-4 ~ % which gem
      /usr/bin/gem
      markbresler@Jacobs-MacBook-Pro-4 ~ % sudo gem install cocoapods
      Password:
      /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /opt/X11/bin in PATH, mode 040777
      Fetching typhoeus-1.4.0.gem
      Fetching algoliasearch-1.27.2.gem
      Fetching ffi-1.13.0.gem
      Fetching cocoapods-core-1.9.3.gem
      Fetching cocoapods-trunk-1.5.0.gem
      Fetching cocoapods-try-1.2.0.gem
      Fetching cocoapods-1.9.3.gem
      ERROR: While executing gem ... (Gem::FilePermissionError)
      You don't have write permissions for the /usr/bin directory.
      markbresler@Jacobs-MacBook-Pro-4 ~ %
  • What should I try next?
    Thanks

  • edited June 2020

    Hey @MarkBresler,
    I am not sure since we don't support our JS APIs on MAC OS.

    To be honest, this it seems like this doesn't have anything to do with our APIs though.
    It seems like a MAC permission/install issue. Have you Google-fued this issue? Seems homebrew's not working on your mac at all. Or maybe your ruby install is messed up?

Sign In or Register to comment.