Skip to content

NoMethodError - undefined method `dirname' for "*.xcworkspace":String #871

Closed
sharplet opened this Issue Mar 18, 2013 · 1 comment

2 participants

@sharplet

Report

  • What did you do?

Updated to 0.17.0.rc5 to fix #754, ran pod install

  • What did you expect to happen?

Install pods and update Podfile.lock to new format

  • What happened instead?

All pods downloaded, error on step "Integrating client project"

Stack

   CocoaPods : 0.17.0.rc5
        Ruby : ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
    RubyGems : 1.8.25
        Host : Mac OS X 10.8.2 (12C2034)
       Xcode : 4.6 (4H127)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib
Repositories : <snip>
               lcl - git://github.com/aharren/LibComponentLogging-CocoaPods-Specs.git @ 8741f53df63cac52ce25044181015be313ff76dd
               master - https://github.com/CocoaPods/Specs.git @ f66b2555ae59d75291635f209653e83efd6f230f

Podfile

platform :ios, '5.1'

workspace 'Foo'

target :Foo do
    xcodeproj 'Foo'
    pod 'LibComponentLogging-pods', '~> 0.0.1'
    pod 'TestFlightSDK',            '~> 1.1'
    pod 'JSONKit', :git => 'https://github.com/sharplet/JSONKit'
    pod 'RestKit', '~> 0.10.3'
end

target :FooUnitTests do
    xcodeproj 'Foo'
    pod 'LibComponentLogging-pods', '~> 0.0.1'
    pod 'GHUnitIOS',            '~> 0.4.35'
    pod 'OCMock',           '~> 2.0.1'
    pod 'RestKit', '~> 0.10.3'
end

Error

NoMethodError - undefined method `dirname' for "Foo.xcworkspace":String
/Library/Ruby/Gems/1.8/gems/cocoapods-0.17.0.rc5/lib/cocoapods/installer/user_project_integrator.rb:85:in `create_workspace'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.17.0.rc5/lib/cocoapods/installer/user_project_integrator.rb:84:in `map'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.17.0.rc5/lib/cocoapods/installer/user_project_integrator.rb:84:in `create_workspace'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.17.0.rc5/lib/cocoapods/installer/user_project_integrator.rb:62:in `integrate!'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.17.0.rc5/lib/cocoapods/installer.rb:355:in `integrate_user_project'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.17.0.rc5/lib/cocoapods/user_interface.rb:52:in `section'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.17.0.rc5/lib/cocoapods/installer.rb:352:in `integrate_user_project'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.17.0.rc5/lib/cocoapods/installer.rb:87:in `install!'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.17.0.rc5/lib/cocoapods/command/project.rb:40:in `run_install_with_update'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.17.0.rc5/lib/cocoapods/command/project.rb:70:in `run'
/Library/Ruby/Gems/1.8/gems/claide-0.2.0/lib/claide.rb:535:in `run'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.17.0.rc5/lib/cocoapods/command.rb:36:in `run'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.17.0.rc5/bin/pod:16
/usr/bin/pod:23:in `load'
/usr/bin/pod:23
@alloy
CocoaPods member
alloy commented Mar 18, 2013

Indeed, an explicit workspace path is being treated as a Pathname, where it is actually a string. It should be converted to a Pathname here before being returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.