Ask A Question

Notifications

You’re not receiving notifications from this thread.

Setup MacOS 10.15 Catalina Discussion

Chris Oliver asked in General

GJ

Reply

Hello,
When I am installing Rails using command - gem install rails -v 6.0.0, I am getting an permission error.
"You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory."

Please help with this

Reply

@Nitish Kumar
Hello,
I've had the same problem. Fixed by adding sudo at the beginning.

Reply

Has anyone else run into a problem downloading RVM after updating to Catalina?

If I run the install script:

\curl -sSL https://get.rvm.io | bash -s stable

I get:

mkdir: /User_Profile.rvm/src: Read-only file system

I imagine I have to adjust some things for zsh but I am totally stuck!

Reply

this is probably way too late but for anyone else with this problem, you will need to mount the disk as rewritable so in terminal run 'sudo /sbin/mount -uw /' and then 'killall Finder'. You might need to disable SIP (Sytem Integrity Protection) before you run the first command so look it up if you do.

Reply

zsh is now the default in Catalina. I wonder if using bash in your install script is part of the problem?

Reply

I get these errors while creating the db. any suggestions?
rake db:create

rake aborted!

TypeError: no implicit conversion of String into Integer
/Users/faqrulislamshaon/rubyrailtest/config/boot.rb:4:in require'
/Users/faqrulislamshaon/rubyrailtest/config/boot.rb:4:in
'
/Users/faqrulislamshaon/rubyrailtest/config/application.rb:1:in require_relative'
/Users/faqrulislamshaon/rubyrailtest/config/application.rb:1:in
'
/Users/faqrulislamshaon/rubyrailtest/Rakefile:4:in require_relative'
/Users/faqrulislamshaon/rubyrailtest/Rakefile:4:in
'
(See full trace by running task with --trace)

Reply

I got this error

/Users/uname/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:95:in rescue in load': Webpacker configuration file not found /Users/uname/Projects/myapp/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /Users/uname/Projects/myapp/config/webpacker.yml (RuntimeError)``

But resolved with the following link:

  1. Install yarn using your OS package manager, or take a look at https://yarnpkg.com/en/docs/install
  2. Set it up rails webpacker:install
  3. Make sure all packages are up to date yarn install --check-files
  4. Start your Rails server rails s
Reply

I just upgraded to Catalina from High Sierra. The final steps:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

Returns the error:
installer: Error - the package path specified was invalid: '/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'.

And now I'm unable to build gems:
bundle install:
...
Fetching sassc 2.2.1
Installing sassc 2.2.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

Any ideas on how to fix?

Thank you!

Reply

For all having a problem permissions denied or cannot run a server, make sure you have sudo with command

Reply

After following these steps and check the rails -v I get

"Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command."

Please advise,
S.

Reply

Same. Did you figure it out?

Reply

Note: If you are having issues building the native extensions with the ruby mysql gem while using mariadb vs mysql you'll want to pass in mariadb's mysql_config bin to it.
example: gem install mysql -- --with-mysql-config=/usr/local/Celler/mariadb/10.5.8/bin/mysql_config
or where ever your mysql_config is located: which mysql_config | xargs realpath

Reply

I ran into problems when installing the ruby mysql2 0.5.3 gem after running rails new myapp -d mysql. The sudo installer -pkg ... command suggested in the tutorial did not work. I received the error message:

Error - the package path specified was invalid: '/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'

Looking at the CommandLineTools folder revealed the issue, as I don't even have the Packages folder in it. I'm on OSX 10.15 (Catalina) for the record.

I also tried to install the gem on its own as per the CLI recommendations with gem install mysql2. That also failed in the same way as the original rails ... command.

The solution for me ended up being gem install mysql2 --source 'https://rubygems.org/' -- --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include. Ran that to install the gem individually then was able to successfully run the rails ... command.

Solution courtesy of https://stackoverflow.com/a/57344765/7465982.

Reply

Just went through the install process and found that I also had to install Node.JS (download from the Node.JS site) and Yarn (brew install yarn) in order to be able to start up the Rails server.

Reply

bundle install not working on Mac OS Catalina .
prashantsingh@Prashants-MacBook-Air: ~/myapp master!
$ rails server [12:10:22]
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 installto install missing gems.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.