infinitered / redpotion

We believe iPhone development should be clean, scalable, and fast with a language that developers not only enjoy, but actively choose. With the advent of Ruby for iPhone development the RubyMotion community has combined and tested the most active and powerful gems into a single package called RedPotion
MIT License
233 stars 40 forks source link

Building vendor project `vendor/Pods' failed to create at least one `.a' library #133

Closed Amnesthesia closed 7 years ago

Amnesthesia commented 9 years ago

Hiya!

I'm trying to get started with redpotion, but can't get past the initial setup. I'm on Yosemite, xcode 6.3 and everything else is set up fine (rake'ing a normal ruby-motion project works fine) but as soon as I've created the redpotion project (by the way, the documentation still has 'redpotion create ' instead of the rails-like 'redpotion new ') and I try to rake it, it fails creating .a libraries (or finding them?) for the vendor/Pods

I've tried to rake clean and rake newclear hoping it'd be that easy, but with no luck. Opening the .xcodeproj for Pods in Xcode and building it works fine as well. I thought, at first, that it might be that I'm on a case-sensitive HFS partition which has caused me trouble before (coming from Linux, when I installed I thought 'why wouldnt it be case sensitive?' and thats where that mistake is from) but the issue remains the same even after doing it all in a case sensitive sparsebundle.

Here's my stacktrace:

Scarlet:Selavi amnesthesia$ rake --trace
** Invoke default (first_time)
** Invoke simulator (first_time)
** Execute simulator
Name: Selavi
Using profile: /Volumes/Disk Image/Selavi/signing/selavi.mobileprovision
Using certificate: iPhone Developer: YOURNAME
** Invoke build:simulator (first_time)
** Invoke schema:build (first_time)
** Invoke schema:clean (first_time)
** Execute schema:clean
rm -rf ./resources/Selavi.xcdatamodeld
** Execute schema:build
** Execute build:simulator
rm -f ./build/iPhoneSimulator-7.1-Development/Selavi.app/Info.plist
/usr/bin/ar -rc "libext.a" CoreDataQueryManagedObjectBase.m.o
/usr/bin/ranlib "libext.a"
    ERROR! Building vendor project `vendor/Pods' failed to create at least one `.a' library.
/Library/RubyMotion/lib/motion/project/vendor.rb:220:in `build_xcode'
/Library/RubyMotion/lib/motion/project/vendor.rb:48:in `block in build'
/Library/RubyMotion/lib/motion/project/vendor.rb:47:in `chdir'
/Library/RubyMotion/lib/motion/project/vendor.rb:47:in `build'
/Library/RubyMotion/lib/motion/project/builder.rb:69:in `block in build'
/Library/RubyMotion/lib/motion/project/builder.rb:68:in `each'
/Library/RubyMotion/lib/motion/project/builder.rb:68:in `build'
/Library/RubyMotion/lib/motion/project/app.rb:78:in `build'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/motion-cocoapods-1.7.1/lib/motion/project/cocoapods.rb:53:in `build_with_cocoapods'
/Library/RubyMotion/lib/motion/project/template/ios.rb:68:in `block (2 levels) in <top (required)>'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/amnesthesia/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/Library/RubyMotion/lib/motion/project/template/ios.rb:187:in `block in <top (required)>'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/amnesthesia/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:199:in `each'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/Users/amnesthesia/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/bin/rake:23:in `load'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/bin/rake:23:in `<main>'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/bin/ruby_executable_hooks:15:in `eval'
/Users/amnesthesia/.rvm/gems/ruby-2.1.0@selavi-potion/bin/ruby_executable_hooks:15:in `<main>'

Any idea of what may be causing this? I've also tried downgrading the cocoapods gem, building in Xcode first, and so on - no luck.

skellock commented 9 years ago

Odd. I can reproduce the same problem over here.

Try this:

potion new sorry
cd sorry
rake clean:all
rm Gemfile.lock

At this point, open your Gemfile in the editor of choice (the correct answer is Vim).

Force cocoapods to bind to 0.37.2 by adding this on line 4: gem "cocoapods", "0.37.2"

Your gems will be loaded in this order: rake, cocoapods, motion-cocoapods.

Then

bundle
rake pod:install
rake

You'll see a warning that cocoapods 0.38.0 is available, but you'll be targeting 0.37.2.

Cocoapods 0.38.0 just came out a few days ago. I'm guessing motion-cocoapods is perhaps getting tripped up? I haven't looked at all, but it's fun to blame others!

Strange

skellock commented 9 years ago

Seems we're not alone:

https://github.com/HipByte/motion-cocoapods/issues/120

andrewhavens commented 7 years ago

This problem has been resolved. Just make sure you have the latest version of motion-cocoapods installed.