rubygems - Permission denied @ dir_s_mkdir (Errno::EACCES) after installing RVM RUBY AND SHOPIFY-CLI
I have been stranded with this 5 hours today, and no online answers seem to exist for my problem....
I just installed .rvm and ruby + gem in order to start as a Shopify Developer. As a installed shopify-cli, and consequently log
shopify version, I get this:
roger.rangel@Rogers-MacBook-Pro Current % shopify version
mkdir': Permission denied @ dir_s_mkdir - /Users/roger.rangel/.config/shopify (Errno::EACCES) from /Users/roger.rangel/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/fileutils.rb:253:in fu_mkdir'
block (2 levels) in mkdir_p' from /Users/roger.rangel/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/fileutils.rb:229:in reverse_each'
block in mkdir_p' from /Users/roger.rangel/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0/fileutils.rb:211:in each'
mkdir_p' from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/vendor/deps/cli-kit/lib/cli/kit/config.rb:128:in write_config'
set' from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/lib/shopify-cli/context.rb:607:in update_time_of_last_check'
new_version' from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/lib/shopify-cli/core/entry_point.rb:13:in call'
block in <main>' from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:75:in handle_abort'
call' from /Users/roger.rangel/.rvm/gems/ruby-3.0.2/gems/shopify-cli-2.3.0/bin/shopify:32:in '
How can I just get rid of this problem???? I am new to web development :(
This sometimes happens when you have run some install command as root. That is, if you have for instance installed
sudo for some command - which has put the ownership of a directory to the
root user of your computer (remember that MacOS is essentially UNIX with a nice UI).
To solve it, in your terminal you have to run
sudo chown -R roger.rangel: /Users/roger.rangel/.config
Another possibility is that you just don't have that directory, in that case, again in your terminal
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.