Installation issue on Mac OS Catalina - Ruby rubygems

Describe the problem as clearly as you can

I am following this website for installing rails on Mac OS Catalina . But getting some error . Ran below command prashantsingh@Prashants-MacBook-Air: ~ $ rails new myapp -d postgresql

```` Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error: https://github.com/rubygems/rubygems/search?q=Permission+denied+%40+dirsmkdir+-+%2FUsers%2Fprashantsingh%2F.rbenv%2Fversions%2F3.0.1%2Flib%2Fruby%2Fgems%2F3.0.0%2Fextensions%2Fx86_64-darwin-19%2F3.0.0%2Fbindex-0.8.1&type=Issues

If there aren't any reports for this error yet, please copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at: https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md run bundle binstubs bundler Could not find gem 'web-console (>= 4.1.0)' in rubygems repository https://rubygems.org/ or installed locally. The source does not contain any versions of 'web-console' rails webpacker:install Could not find gem 'web-console (>= 4.1.0)' in rubygems repository https://rubygems.org/ or installed locally. The source does not contain any versions of 'web-console' Run bundle install to install missing gems. ```

Post steps to reproduce the problem

Which command did you run?

What were you expecting to happen?

What actually happened?

If not included with the output of your command, run bundle env and paste the output below

Asked Oct 12 '21 10:10
avatar eelectron
eelectron

2 Answer:

The error is regarding filesystem permissions:

Permission denied @ dirsmkdir - /Users/prashantsingh/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-19/3.0.0/bindex-0.8.1

That's a directory your user should have write access to.

When you were following the steps on that website, did you use sudo for any of the Ruby or Rails steps?

1
Answered Jun 15 '21 at 07:43
avatar  of zofrex
zofrex

Hi, I tried with sudo as below and it worked . That was certainly a permission issue . I could not understand the error message properly . Thank you so much . I did not expected the reply so fast .

prashantsingh@Prashants-MacBook-Air: ~/Documents/IntoductionToAgile_Berkeley $ sudo rails new myapp -d postgresql [18:05:13] Password:

1
Answered Jun 16 '21 at 10:10
avatar  of eelectron
eelectron