-
Notifications
You must be signed in to change notification settings - Fork 189
Support for arm64-darwin-21 #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for arm64-darwin-21 #117
Conversation
Apple's M1 Pro chip is referenced as arm64-darwin-21. So the installation process can't succeed because the executable file is missing for the platform.
Cc @flavorjones |
I also ran into this with Rails 7
|
@juanmanuelramallo and @dinshaw-he - did you follow the instructions in the error message and make sure you had added the native platform to your lock file? If so, please respond with:
Without more information, my guess is that you've installed the "vanilla" ruby platform gem and not the native platform gem. The above information will help me diagnose more specifically. |
Yes, I added the native platform to my lockfile as specified in the error message. gem env
bundle show
cat Gemfile.lock
|
@juanmanuelramallo Thanks for the quick response. Can you tell me what's in the directory |
|
This is why I executed these steps in order to make it work (from the PR's description):
|
@juanmanuelramallo Thanks again. It looks like bundler choosing to use the vanilla "ruby" platform gem, and not the native one. What version of bundler are you using? This may be a bug in bundler itself that we can report upstream (that is, bundler should prefer the native gem to the "ruby" gem if both are available). |
Put more specifically: I'm running bundler v2.2.32 on an M1 with both "ruby" and "arm64-darwin-21" in my lock file. When I run "bundle show --paths" I see:
which is the native gem (and not the "ruby" platform gem). |
Ok, I'll make sure to file the issue in bundler later today, I'll do some research first. Thank you so much for your help @flavorjones. I'll close the PR for now. |
I see this is closed and I think my situation is the same but figured I'd add this info in case it's helpful. gem env
bundle show
cat Gemfile.lock
bundle show --paths
Following the install steps worked but removed the |
@flavorjones thank you for the great pointers. The issue was that I had BUNDLE_FORCE_RUBY_PLATFORM set to true in the global config file for bundler. As soon as I set that to false, and reinstalled the gems with bundler, I saw the expected output:
Then when running @dinshaw-he check if you also have the BUNDLE_FORCE_RUBY_PLATFORM variable set in your |
@juanmanuelramallo 👏 Thanks for closing the loop! |
I do! Nice find, thank you! |
Steps to reproduce
./bin/bundle add tailwindcss-rails
./bin/rails tailwindcss:install
Expected
Tailwind is correctly installed in the app
Actual
The following error is displayed:
Description
Apple's M1 Pro chip is referenced as arm64-darwin-21. So the
installation process can't succeed because the executable file is
missing for the platform.
In order to test this, I did the following:
rake gem:arm64-darwin-21
./exe/arm64-darwin-21
to the gem's folder in my machine~/.gem/ruby/3.0.3/gems/tailwindcss-rails-2.0.2/exe/arm64-darwin-21
./bin/rails tailwindcss:install
command and everything worked successfullyPerhaps we could update the package.rake to alias arm64-darwin to arm64-darwin-21 or something similar. Perhaps this will make more sense if it becomes a trend for Apple to change their processor's arch name after a new release. I'm still unsure if the M1 Max has a different name, I'd bet it does.