Cocoapods: No such file or directory @ rb_sysopen

Created on 20 Dec 2017  路  8Comments  路  Source: CocoaPods/CocoaPods

Report

  • What did you do?
    learn the RN-turtorial
    http://facebook.github.io/react-native/docs/0.51/integration-with-existing-apps.html
  • What did you expect to happen?
    should see output such as:
    Analyzing dependencies
    Fetching podspec for React from ../node_modules/react-native
    Downloading dependencies
    Installing React (0.26.0)
    Generating Pods project
    Integrating client project
    Sending stats
    Pod installation complete! There are 3 dependencies from the Podfile and 1 total pod installed.
  • What happened instead?

Stack

   CocoaPods : 1.3.1
        Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
    RubyGems : 2.5.2
        Host : Mac OS X 10.13.1 (17B1003)
       Xcode : 9.2 (9C40b)
         Git : git version 2.14.3 (Apple Git-98)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 4ed6599891572b6784566547f29a0bc1e55d2509

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.2.0
cocoapods-try         : 1.1.0

Podfile

# The target name is most likely the name of your project.
target 'NumberTileGame' do

  # Your 'node_modules' directory is probably in the root of your project,
  # but if not, adjust the `:path` accordingly
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket', # needed for debugging
    # Add any other subspecs you want to use in your project
  ]
  # Explicitly include Yoga if you are using RN >= 0.42.0
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'GLog', :podspec => '../node_modules/react-native/third-party-podspecs/GLog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

end

Error

Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/bill/demo/ReactComponent/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:37:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:37:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:37:in `open'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/external_sources/podspec_source.rb:19:in `block in fetch'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/user_interface.rb:85:in `titled_section'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/external_sources/podspec_source.rb:11:in `fetch'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:686:in `fetch_external_source'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:662:in `block (2 levels) in fetch_external_sources'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:661:in `each'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:661:in `block in fetch_external_sources'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:660:in `fetch_external_sources'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/analyzer.rb:76:in `analyze'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:242:in `analyze'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:153:in `resolve_dependencies'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:116:in `install!'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/command/install.rb:41:in `run'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.3.1/libexec/bin/pod:22:in `load'
/usr/local/Cellar/cocoapods/1.3.1/libexec/bin/pod:22:in `<main>'

Most helpful comment

For future googlers, doing another npm install after ejecting seemed to bring in the dependencies that were missing. After that, pod install started working for me.

All 8 comments

Is this a submodule? Seems like /Users/bill/demo/ReactComponent/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec is not present on your file system.

I am unfamiliar with how this repo and tutorial works but I do not think this is a cocoapods library bug.

We could potentially show a better error message here but I think the one from the stacktrace is pretty descriptive.

Going to close this one but please update here if you figure out this is really a CocoaPods library bug.

@bill-mark I was having a similar issue and found this https://github.com/CocoaPods/CocoaPods/issues/3695 which instructs you to blow away the Pods folder before running pod install and it cleared up the issue for me, perhaps it will help you!

Didn't work for me. Still getting the same error no matter what I do.

I've reinstalled cocoapods, deleted the folder, and tried all the other advice out there but nothing works....

And I'm on 1.5.3

For future googlers, doing another npm install after ejecting seemed to bring in the dependencies that were missing. After that, pod install started working for me.

For future googlers, doing another npm install after ejecting seemed to bring in the dependencies that were missing. After that, pod install started working for me.

Work to me!! Thanks!

"All of the node files were searching for two directories up when it was only one directory up."

from this

It's work for me

For future googlers, doing another npm install after ejecting seemed to bring in the dependencies that were missing. After that, pod install started working for me.

It worked, Thanks!!

Was this page helpful?
0 / 5 - 0 ratings