Ask A Question

Notifications

You’re not receiving notifications from this thread.

Setup MacOS 11.0 Big Sur Discussion

Chris Oliver asked in General

When installing the headers:
'sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / '

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

Do you know the correct command for Mac OS Big Sur?

Reply

I've got the same error.
Were you able to solve it?
Thanks

Reply

I installed the whole Xcode software on my mac. Skip this step and created successfully a rails 6 app. And I can run it at the moment.

But I'm experiencing many other problems since upgraded to big sur though.

Reply

I had to reinstall Xcode client by installing the latest CLT package from https://developer.apple.com/download/more/ .. After that, things seemed to work. I didn't install the whole Xcode.

Reply

Still getting the same error message after install the CLT package..

Reply

Thank so much.

Reply

For Mac OS Big Sur, the command to install the headers is slightly different. Here's the correct command:

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.15.pkg -target /

Please note that the package name has changed from "macOS_SDK_headers_for_macOS_10.14.pkg" (for macOS Mojave) to "macOS_SDK_headers_for_macOS_10.15.pkg" (for macOS Catalina). This package should still work for Mac OS Big Sur.

Post by:

Reply

On 11.0.1 I have got a
Last 10 log lines:
compiling mjit.c
internal:core core/kernel.rb:257:in `require': Library "/usr/lib/libSystem.B.dylib" does not exist. (RuntimeError)

Reply

I am trying to install Homebrew but it's failing to install. Here are the errors that I am getting on MacOS Big sur:

error: unable to unlink old 'Library/Homebrew/brew.sh': Operation not permitted
fatal: Could not reset index file to revision 'origin/master'.
Failed during: git reset --hard origin/master

Running using sudo says "Don't run this as root!"

Reply

I get the error:
error: unable to unlink old 'Library/Homebrew/brew.sh': Operation not permitted
fatal: Could not reset index file to revision 'origin/master'.
Failed during: git reset --hard origin/master
slitherio

Reply

Not sure if you have the same issue as I got with openssl 1.1/1.1.1i. Downgrading worked for me https://ankane.org/ruby-openssl-1-1

Reply

Hey Chris. Having issues with installing on an M1 MBP. I can get bundler to finish successfully, however, when I go to run rails s it fails with '.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/ffi-1.13.1/lib/ffi/types.rb:69:in `find_type': unable to resolve type 'size_t' (TypeError)'. From what I can tell it's because ffi needs to be updated. Do you know of a way to work around it for now?

Reply

I got an error from ffi as well on M1. What solved for me was to run bundle update ffi -- --disable-system-libffi

Reply

Hi André,

oh that looks promising.... but maybe a typo, or I don't get it, when I type:

bundle update ffi -- --disable-system-libffi

it returns

Could not find gem '--disable-system-libffi'

I can do a

gem install ffi -- --disable-system-libffi

but it doesn't affect the result....

Reply

Just a note: after setting up rbenv you may have to restart your terminal for the changes to take effect as mentioned in the rbenv docs

Reply

When choosing mysql as the database, I'm getting the following error:

rails aborted!
LoadError: dlopen(/Library/Ruby/Gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle, 0x0009): dependent dylib 'libssl.1.1.dylib' not found for '/Library/Ruby/Gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle'. relative file paths not allowed 'libssl.1.1.dylib' - /Library/Ruby/Gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle

has anyone been on that situation? I'm using ruby v2.6.3p62, rails v6.1.1 and mysql 8.0.23 I tried creating an app with the default settings (sqlite) and it works, also making a connection to mysql server and it's also working. I'm not sure what's could be missing

Reply
[~] rbenv install 3.0.0

ruby-build: definition not found: 3.0.0
The following versions contain `3.0.0' in the name:
  3.0.0-dev
  3.0.0-preview1
  3.0.0-preview2

Am I missing something?

Reply

The solution is to update brew.

brew update && brew upgrade ruby-build
Reply
Reply

Just went through this a brand new mac (lucky me.) No real issues, HOWEVER when creating a rails app you will first get an error saying you need to install node, then you install node, and try again, and you get an error saying you need yarn.

Both are easy enough to fix, just follow the instructions given when you get the error. But it would be nice for first time rails users, if this doc could be updated.

Also I did NOT have to change anything to do with the C headers (this is on BigSur)

Reply

I’m using a MacBook Pro 16” and I was wondering if I should finally update to Big Sur (11.2.1) from macOS Catalina. Until now, TensorFlow has only utilized the CPU for training on Mac but the tensorflow_macos fork of TensorFlow 2.4 leverages ML Compute to enable machine learning libraries to take full advantage of both the CPU and the GPU in Intel-powered Macs. This is something I’m really excited about but I’m skeptical about the day-to-day performance issues I’ll have to deal with. What should I do? https://blossomfurnishings.com/wholesale dining tables/

Reply

I'm having issues with the sudo installer. Tried to install XCode like the comments above but still get the error below.

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

Any way to fix this?

Reply

Hi Chris, thanks for the guide, it was helpful.

I ran into some issues installing ruby 2.6.6 on the following:

macOS Big Sur Version 11.2.3
Xcode Version 12.4

After hours of failed compiles with lots of unhelpful missing 'require' messages (and rdoc even failing at one point, right before the end) I ended up using 'asdf' instead of 'rbenv'. important Specifically installing the following libs with homebrew before attempting the ruby install seemed to do the trick:

brew install gpg zlib openssl readline libyaml
brew install asdf

Then, finally:

asdf install ruby 2.6.6
asdf reshim ruby

Hope this helps someone else to save some time,
Tom

Reply

Thanks by advance for your feedback Tom.
I've tried your solution but I can't get it through... I have successfully install the libs and asdf.
But when I tried to install ruby with the command
asdf install ruby 2.6.6
the output is bash: /Users/---/.asdf/plugins/ruby/bin/install: No such file or directory
Do you have any solutions for that ?
Thanks by advance

Reply

Hey Lucas,

Perhaps try reinstalling the ASDF ruby plugin:
asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git

Links:
https://github.com/asdf-vm/asdf/issues/797
https://github.com/thoughtbot/dotfiles/issues/577

Good luck, Tom

Reply

Hey Chris, I just ran through this with a repurposed MacBook Air, and I hit the mimemagic blocker.

It works with Rails 6.1.3.1.

Reply

I am getting
'An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue.
Make sure that gem install mysql2 -v '0.5.3' --source 'https://rubygems.org/' succeeds before bundling.'
while checking MySQL version by
mysql --version # its returning bellow
mysql Ver 8.0.26 for macos11.4 on arm64 (Homebrew)

Reply

COMMENT ADDED: I found the problem. I had a -B in my .railsrc from a long time ago, which told it not to run bundler and from that it decided not to do rails webpacker:install. (I really dislike and continue to be confused by the way webpacker is (not) integrated into rails)

ORIGINAL QUESTION: I guess I must be unique, because I got an error no one has reported. This is on the MacOS beta (latest), and I have everything up to this point installed correctly. I also did an extra bundle command just to be sure. Here's the error:

~/mydev/gorails/myapp (master) rails s
=> Booting Puma
=> Rails 6.1.4 application starting in development
=> Run bin/rails server --help for more startup options
Exiting
/Users/pitosalas/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/webpacker-5.4.0/lib/webpacker/configuration.rb:103:in `rescue in load': Webpacker configuration file not found /Users/pitosalas/mydev/gorails/myapp/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /Users/pitosalas/mydev/gorails/myapp/config/webpacker.yml (RuntimeError)

Reply

this is ruining my day totally :(

dyld: lazy symbol binding failed: Symbol not found: _mysql_server_init
  Referenced from: /Users/walther/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle
  Expected in: flat namespace

I've single-handedly restored the russian economy (judged by the amount of energy/gas I've spent googling, reinstalling everything but the macOS)

has anyone had success installing the arm64 mysql server using brew on Big Sur 11.6.5 (I did) followed by installing the mysql2 gem (I didn't) ?

I've collected quite a set of settings that you may browse here

Reply
Join the discussion
Create an account Log in

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

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

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