Can't install Cedar via CocoaPods

168 views
Skip to first unread message

da...@puteko.com

unread,
Dec 8, 2014, 7:54:56 AM12/8/14
to cedar-...@googlegroups.com
I have been trying every means to install Cedar. Currently, I am attempting to use Cocoapods. After installing Xcode command line tools, cocoa pods and finally calling Pod Install, I get the following error message:

Davids-MBP:DaveCedar2 admin$ pod install

Analyzing dependencies

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `open': No such file or directory - /Users/admin/.cocoapods/repos (Errno::ENOENT)

from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `foreach'

from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `children'

from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:63:in `all'

from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface/error_report.rb:130:in `repo_information'

from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface/error_report.rb:34:in `report'

from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:58:in `report_error'

from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:300:in `handle_exception'

from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:274:in `rescue in run'

from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:264:in `run'

from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'

from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'

from /usr/bin/pod:23:in `load'

from /usr/bin/pod:23:in `<main>'


I am on Yosemite 10.10.1, Xcode 6.1.1



sco...@pivotal.io

unread,
Dec 8, 2014, 8:12:00 AM12/8/14
to cedar-...@googlegroups.com
What happens if you run `pod setup` first?

If that doesn't work, try deleting ~admin/.cocoapods before trying again.

--Sam

> On Dec 8, 2014, at 7:54 AM, da...@puteko.com wrote:
>
> .cocoapods/repos (Errno::ENOENT)

da...@puteko.com

unread,
Dec 10, 2014, 8:06:56 AM12/10/14
to cedar-...@googlegroups.com
This seemed to allow the cocoa pods installer to finish. However, I still could not see the Cedar templates when I created a new file, and it still could not find Cedar/Cedar.h in the #import statement. I then tried 'rake install' which failed, until I copied iOS-sim into the /usr/bin directory. Suddenly it successfully installed all the templates. Now, however, I cannot seem to set up my project in such a way that it can see Cedar.h. I have mimicked the setup I saw on another project, and still no luck.

Attached are the screenshots off all my setup info:
Screen Shot 2014-12-10 at 9.57.36 PM.png
Screen Shot 2014-12-10 at 9.57.48 PM.png
Screen Shot 2014-12-10 at 9.58.29 PM.png
Screen Shot 2014-12-10 at 9.58.13 PM.png

Sam Coward

unread,
Dec 24, 2014, 12:54:34 PM12/24/14
to cedar-...@googlegroups.com
Hi,

Sorry for the late reply.  Are you still trying to get this to work?

You might have more luck adding to the User headers search path, and trying to import without any relative path, i.e. #import "Cedar.h"

Regardless, I'm not 100% sure why you have Cedar installed as a submodule if you were installing it using cocoapods.  The installation instructions for using cocoapods (https://github.com/pivotal/cedar/wiki/Installation#installation-via-cocoapods) is a different approach from using submodules (https://github.com/pivotal/cedar/wiki/Installation#installing-a-cross-project-dependency-as-a-submodule).  

One advantage the cocoapods installation has over the submodule approach is that cocoapods will take care of all the header related build settings.

Anyway, I hope this helps; Happy holidays!

--
Sam

--
You received this message because you are subscribed to the Google Groups "Cedar Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cedar-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dman...@gmail.com

unread,
Dec 29, 2014, 9:03:02 PM12/29/14
to cedar-...@googlegroups.com
No I have not gotten it to work. I went through the CocoaPods route again, which was slightly more successful than last time. I did the pod initialization stuff, which gave no errors. I created a Cedar test file. Then I created a Cedar test suite. I took said Cedar file and checked off my newly created Cedar Test Suite under target membership.

No sooner did I do this that at the top of my Cedar spec file, where it attempts to do the import:

#import <Cedar/Cedar.h>

 It again gave the error:
Cedar/Cedar.h file not found.

The installation tools and documentation for this product are untenable.

-Dave

Sam Coward

unread,
Dec 30, 2014, 12:08:14 PM12/30/14
to cedar-...@googlegroups.com
Hi Dave,

How did you create the Cedar test suite?  If you did this by creating a new target "iOS Cedar Spec Suite" or "iOS Cedar Testing Bundle" then this won't work with the cocoapods installation, as it sets specific linker settings on the target which are only meant to be used with binary distributions of the Cedar library.

If you're following the cocoapods instructions I linked in my previous e-mail (first link), you should have added Cedar as a dependency to the testing bundle that Xcode creates with your project. I've just tried those instructions on Yosemite, Xcode 6.1.1 with cocoapods 0.35.0 and found an error in the suggested import path which I have now corrected and verified works correctly.

I sense your frustration. For what it's worth, Cedar is open source software (we're not paid to develop it or answer questions on this mailing list; we just happen to be very passionate about BDD) and we welcome the participation of the community, your feedback, and even the time you have spent trying out Cedar.

--
Sam

tjar...@pivotal.io

unread,
Dec 30, 2014, 6:58:36 PM12/30/14
to cedar-...@googlegroups.com, dman...@gmail.com
I've run into this a few times recently. I believe there is currently an issue with how Cedar exposes its headers with Cocoapods. The template gives you 

#import <Cedar/Cedar.h>

but if you change that to 

#import <Cedar-iOS/Cedar.h>

it should work. It has something to do with the framework search paths and how cocoapods sets up your .xcodeproj file, but I hadn't had time to determine exactly what is wrong.

dman...@gmail.com

unread,
Jan 1, 2015, 3:05:22 PM1/1/15
to cedar-...@googlegroups.com, dman...@gmail.com, tjar...@pivotal.io
Now I have a new issue. When I try to do the basic pod installation, and I get to the step saying "Pod Install" I get the following error message:

[!] Invalid `Podfile` file: undefined local variable or method `‘Cedar’' for #<Pod::Podfile:0x007f9d54a5dcc0>. Updating CocoaPods might fix the issue.


 #  from /Users/admin/Documents/Programming/xcode/UltraMusician/Podfile:9

 #  -------------------------------------------

 #  target 'UltraMusicianTests' do

 >  pod ‘Cedar’

 #  end

 #  -------------------------------------------


Isn't there a pivotal meetup on Monday's or something where I can get some hands on help installing this? I have spent no less than 40 hours trying to get Cedar working, and here's the thing: I'm not just a regular Joe who stumbled upon it. I was trained by the people at pivotal labs, I use Cedar every day at work, and I am the lead developer on my project. The fact that I can't get it working is not a trivial problem. I need this to work.

Andrew Kitchen

unread,
Jan 1, 2015, 3:24:27 PM1/1/15
to cedar-...@googlegroups.com, dman...@gmail.com, Tim Jarratt
Hi Dave

You are encountering this latest issue for reasons having nothing to do with Cedar: your Podfile declares a dependency on Cedar using backticks (`) instead of single or double quotes.

With a valid Podfile I was able to add Cedar to a project via Cocoapods without issue.  Here is the Podfile I created:

target 'CocoapodsExample' do


end


target 'CocoapodsExampleTests' do

  pod 'Cedar', git: 'https://github.com/pivotal/cedar'

end


HTH

Andrew


Andrew Kitchen

unread,
Jan 1, 2015, 3:26:24 PM1/1/15
to cedar-...@googlegroups.com, dman...@gmail.com, Tim Jarratt

[!] Invalid `Podfile` file: undefined local variable or method `‘Cedar’' for #<Pod::Podfile:0x007f9d54a5dcc0>. Updating CocoaPods might fix the issue.


 #  from /Users/admin/Documents/Programming/xcode/UltraMusician/Podfile:9

 #  -------------------------------------------

 #  target 'UltraMusicianTests' do

 >   pod ‘Cedar’

 #  end

 #  -------------------------------------------


Actually, it's a smart quote, not a backtick.  But still not valid for ruby code.

dman...@gmail.com

unread,
Jan 1, 2015, 3:30:18 PM1/1/15
to cedar-...@googlegroups.com, dman...@gmail.com, tjar...@pivotal.io
Compliments of textEdit. Redid it in TextWrangler and it worked. Thanks. Now seeing if tests work in my project...

tjar...@pivotal.io

unread,
Jan 1, 2015, 4:56:00 PM1/1/15
to cedar-...@googlegroups.com, dman...@gmail.com, tjar...@pivotal.io
Dave,

If it's any consolation, I also found the experience of starting with Cedar to be incredibly daunting when I began writing more iOS apps (and test driving more with Obj-C) last fall. I've definitely experienced a lot of the same pain you've shared in this thread.

The biggest problem I see is that there are a lot of different, yet small things to know to be effective:

* how to install and setup a cocoapod
* ruby (for the podfile syntax)
* import paths for headers in xcode
* many other disparate tools and concepts I can't think of off the top of my head

Many of us work in our free time on Cedar to improve it, and we share the same frustrations. I wish I could share with you one secret that would make everything work, or the secret documentation we have, but that doesn't exist. I'd love to see better documentation for Cedar, but for me, there was nothing better than just using these tools every day for hundreds of hours and troubleshooting dozens of small problems like you have. It's the (unfortunate) reality of what we do -- make {buggy, incomplete} software work the way we need it to.

Is there anything we could do to improve the onboarding experience for someone using Cedar in a new project? Maybe an example podfile in the README? I'd love to know what else you think we could improve since you so recently went through such great lengths to get Cedar up and running.

Thanks,

-Tim

dman...@gmail.com

unread,
Jan 1, 2015, 5:08:34 PM1/1/15
to cedar-...@googlegroups.com, dman...@gmail.com, tjar...@pivotal.io
Thank you for asking,

I have already taken pages of personal notes working on it, and I could certainly provide many suggestions, but here are a few things off the top of my head:

1) It needs to be mentioned that in order to use Cocoapods, there is a setup step not present in the documentation
"Pod setup". Without this the pod installer crashes halfway.

2) The regular installer fails 100% of the time because iOS-sim does not work. Even though iOS-sim is included in the cedar folder, it still does not run. In order to get it to work I had copy it into one of the folders accessible in the path statement. (I also downloaded a different version of iOS-sim that said it was compatible with Xcode 6

Now I am at a point where the installers themselves don't fail, but I still am trying to get the settings to work in my project. I got it to work once in a test project but haven't yet gotten it to work in my project.

I think the root of the problem is that these installation scripts and docs you provide need to be tested on a brand new 100% clean machine with nothing else installed on it. I think because you are developers, you have a host of preconditions already met, such as having a path to iOS-sim already established, or having cocoa pods fully configured. On a brand new machine (and I literally bought a new machine in Tokyo largely for this purpose) all the installation methods given on the site crash 50% of the way through.

If you follow the instructions literally as given on the web page using a clean machine with the latest OS and latest xCode, you will see that all of these pathways crash. (And I don't mean just not work, they crash halfway through the installation process) It is only by deviating from the given instructions that is possible to get it to work.

-Dave

dman...@gmail.com

unread,
Jan 4, 2015, 5:45:35 PM1/4/15
to cedar-...@googlegroups.com, da...@puteko.com
Starting with a fresh install, I carefully followed the CocoaPods version of the installation. After running "pod install" from the command line, I ran Command-U in my Xcode project just to be certain nothing was broken and I could proceed with the remaining steps. I received a Mach-O linker error as follows:

ld: library not found for -lPods-UltraMusicianTests-Cedar

dman...@gmail.com

unread,
Jan 6, 2015, 11:49:50 PM1/6/15
to cedar-...@googlegroups.com, da...@puteko.com, dman...@gmail.com
I would like someone from the local Santa Monica office to make a lunchtime appointment with me to get this working, preferably Wednesday.
Reply all
Reply to author
Forward
0 new messages