Skip to content
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

I have isse when installing new react native application #12326

Closed
SL-BLACK-EAGLE opened this issue Mar 26, 2024 · 6 comments
Closed

I have isse when installing new react native application #12326

SL-BLACK-EAGLE opened this issue Mar 26, 2024 · 6 comments

Comments

@SL-BLACK-EAGLE
Copy link

✔ Downloading template
✔ Copying template
✔ Installing dependencies
✔ Do you want to install CocoaPods now? Only needed if you run your project in Xcode directly … yes
✖ Installing Ruby Gems
error Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Fetching base64 0.2.0
Installing base64 0.2.0
Fetching nkf 0.2.0
Installing nkf 0.2.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/macintosh/Projects/AwesomeProject/vendor/bundle/ruby/2.6.0/gems/nkf-0.2.0/ext/nkf
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20240326-4210-bfrxoc.rb extconf.rb
creating Makefile

current directory:
/Users/macintosh/Projects/AwesomeProject/vendor/bundle/ruby/2.6.0/gems/nkf-0.2.0/ext/nkf
make "DESTDIR=" clean

current directory:
/Users/macintosh/Projects/AwesomeProject/vendor/bundle/ruby/2.6.0/gems/nkf-0.2.0/ext/nkf
make "DESTDIR="
make: *** No rule to make target
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin21/ruby/config.h', needed by nkf.o'. Stop.

make failed, exit code 2

Gem files will remain installed in
/Users/macintosh/Projects/AwesomeProject/vendor/bundle/ruby/2.6.0/gems/nkf-0.2.0
for inspection.
Results logged to
/Users/macintosh/Projects/AwesomeProject/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/nkf-0.2.0/gem_make.out

An error occurred while installing nkf (0.2.0), and Bundler cannot continue.
Make sure that gem install nkf -v '0.2.0' --source 'https://rubygems.org/'
succeeds before bundling.

In Gemfile:
cocoapods was resolved to 1.14.3, which depends on
xcodeproj was resolved to 1.24.0, which depends on
CFPropertyList was resolved to 3.0.7, which depends on
nkf
error Installing pods failed. This doesn't affect project initialization and you can safely proceed.
However, you will need to install pods manually when running iOS, follow additional steps in "Run instructions for iOS" section.

✖ Installing Ruby Gems

@monfresh
Copy link

monfresh commented Mar 26, 2024

Hi @SL-BLACK-EAGLE. You're getting this issue because you're using the version of Ruby that came preinstalled on your Mac. The most reliable way to install Cocoapods on a Mac is to set up a proper Ruby development environment that uses a version manager to install a newer and separate version of Ruby that doesn't interfere with the system Ruby. Once you have that, installing a new React Native application should work.

Here's a very detailed step-by-step guide for installing Ruby on a Mac.

@SL-BLACK-EAGLE
Copy link
Author

SL-BLACK-EAGLE commented Mar 27, 2024

HI @monfresh. First of all I would like to thank you very much and appreciate your prompt response for the issue i have created.
I have read your comment as well as the document you have linked. i have read all the details and in the document top to bottom step by step. It’s very helpful to me. i have follow the steps as per the instructions. and finally i have successfully created the React native application by react native CLI command. i have spend many times to solve it and it all the time it’s failed. but you have solved and save my time in one Response. Thank you for your support.
Recommend to all of the developers who are facing the issue as mine - step-by-step guide for installing Ruby on a Mac.

@monfresh
Copy link

You're very welcome! I'm glad it worked for you.

@manjotsk
Copy link

manjotsk commented Mar 30, 2024

At some point, i happened to enable rosetta for terminal(which I totally forgot about later). This is a life saver @monfresh . This is just brilliant. Saved a lot of my time!

@paulb777 paulb777 closed this as completed Apr 3, 2024
@gitcheap
Copy link

gitcheap commented May 1, 2024

Hi @SL-BLACK-EAGLE. You're getting this issue because you're using the version of Ruby that came preinstalled on your Mac. The most reliable way to install Cocoapods on a Mac is to set up a proper Ruby development environment that uses a version manager to install a newer and separate version of Ruby that doesn't interfere with the system Ruby. Once you have that, installing a new React Native application should work.

Here's a very detailed step-by-step guide for installing Ruby on a Mac.

Thanks a bunch ❤️

@Alwaz
Copy link

Alwaz commented May 7, 2024

Thanks a bunch, worked for me as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants