0

All day long I've tried to install SASS on Mac as detailed on the SASS page but I can only run it from my administrator account.

For security, on my Mac I have 2 user accounts, admin user (which I use only to install and uninstall software) and normal user, which I use for everything else.

When I run the command sass -v from the admin user account, I have the sass version but, when I run the same command from the normal user account I have the next error

env: ruby_executable_hooks: No such file or directory

I've tried to install sass from the normal user account but, it tells me that I have not permissions.

The NORMAL user's RubyGems environment is:

    RubyGems Environment:
  - RUBYGEMS VERSION: 2.6.12
  - RUBY VERSION: 2.0.0 (2015-12-16 patchlevel 648) [universal.x86_64-darwin16]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
  - USER INSTALLATION DIRECTORY: /Users/mramos/.gem/ruby/2.0.0
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - SPEC CACHE DIRECTORY: /Users/mramos/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Library/Ruby/Site
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-16
  - GEM PATHS:
     - /Library/Ruby/Gems/2.0.0
     - /Users/mramos/.gem/ruby/2.0.0
     - /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /opt/X11/bin
     - /Users/mramos/.rvm/bin

The ADMINISTRATOR user´s RubyGems Environment is:

RubyGems Environment:
  - RUBYGEMS VERSION: 2.6.12
  - RUBY VERSION: 2.4.1 (2017-03-22 patchlevel 111) [x86_64-darwin16]
  - INSTALLATION DIRECTORY: /Users/admin/.rvm/gems/ruby-2.4.1
  - USER INSTALLATION DIRECTORY: /Users/admin/.gem/ruby/2.4.0
  - RUBY EXECUTABLE: /Users/admin/.rvm/rubies/ruby-2.4.1/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/admin/.rvm/gems/ruby-2.4.1/bin
  - SPEC CACHE DIRECTORY: /Users/admin/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Users/admin/.rvm/rubies/ruby-2.4.1/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-16
  - GEM PATHS:
     - /Users/admin/.rvm/gems/ruby-2.4.1
     - /Users/admin/.rvm/gems/ruby-2.4.1@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /Users/admin/.rvm/gems/ruby-2.4.1/bin
     - /Users/admin/.rvm/gems/ruby-2.4.1@global/bin
     - /Users/admin/.rvm/rubies/ruby-2.4.1/bin
     - /usr/local/opt/openssl/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /opt/X11/bin
     - /Users/admin/.rvm/bin
     - /Users/admin/.rvm/bin

Please, help!

  • You're using RVM for one user and not for the other. That's the source of your problem. – tadman Aug 10 '17 at 18:56
  • Thank you for your answer but, I really don't know about Ruby's world. I work with node.js so please, Could you show me how I can solve it? – Marcos Ramos Aug 10 '17 at 19:02
  • Your RVM installation for the admin user is taking priority. It's user specific, so these are two separate worlds. Get rid of RVM, or do a system RVM install to make both environments identical. – tadman Aug 10 '17 at 19:03

1 Answers1

0

Done! I share my solution below:

  1. I have uninstalled all the ruby's versions that I had via RVM.
  2. Then uninstalled rvm doing as is showing in this post => How can I remove RVM (Ruby Version Manager) from my system?
  3. I've reinstalled RVM again but in 'multi-user' mode, as described on the official RVM site, using the command below: \curl -sSL https://get.rvm.io | sudo bash -s stable

  4. I've added the users one by one to the group rvm using the command below:

    sudo dseditgroup -o edit -a username_to_add -t user rvm

  5. Logged out and Login again

  6. Install SASS via gem using the command below: rvm all do gem install sass

  7. Verify installation: sass -v

I hope this post help someone else!