Getting TypeError - no implicit conversion of Pathname into String
I am trying to get Cocopods (local) work with artifactory. Below are the steps I have done.
- Created Cocopods-local - repo
- Deployed 'mypod.tar.gz' to local instance of jfrog artifactory pro.
- Changed pod file.
use_frameworks!
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
plugin 'cocoapods-art', :sources => [
'cocoapods-local'
]
target 'Download Sample' do
pod 'dowloadHud'
target 'Download SampleTests' do
inherit! :search_paths
end
target 'Download SampleUITests' do
inherit! :search_paths
end
end
- When I run pod install, I am getting below error.
[!]Error installing dowloadHud
TypeError - no implicit conversion of Pathname into String
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:513:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:513:in `exception'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:513:in `raise'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:513:in `block in mv'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1558:in `block in fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1567:in `block in fu_each_src_dest0'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1565:in `each'
I encountered the same issue.
When I tried with pod install --verbose, I discovered that the pod was found but the unarchive operation seemed to fail. The pod install error was :
`Installing AppMonitoring (0.1.2)
Http download $ /usr/bin/curl -n -f -L -o /var/folders/8f/wn5b73g536bc9r1x37qgw3pr0000gp/T/d20170329-79444-1tb7180/file.tgz http://url.of.repo/api/pods/cocoapods-corporate/pod/pkg/AppMonitoring/0.1.2 --create-dirs % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 482k 100 482k 0 0 2177k 0 --:--:-- --:--:-- --:--:-- 2183k $ /usr/bin/tar xfz /var/folders/8f/wn5b73g536bc9r1x37qgw3pr0000gp/T/d20170329-79444-1tb7180/file.tgz -C /var/folders/8f/wn5b73g536bc9r1x37qgw3pr0000gp/T/d20170329-79444-1tb7180 [!] Error installing AppMonitoring `
I tried the link used by the previous curl command and the download was successfull.
In my case it was because the uploaded tar.gz file did not contain the .git folder.
So to fix this, I just opened a terminal and went to the folder of my pod, then typed the command :
tar pczf MyPod.tar.gz .
Finally I uploaded my archive and update with pod repo-art update <repo_name>
After that pod install was succesfull.
Hope it'll help you.
@PinwheelAi Can you check your spelling? You created Cocopods-local but in your podfile you wrote cocoapods-local.