Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to open and parse playground chapter. #54

Open
ag opened this issue Mar 31, 2017 · 5 comments
Open

Failed to open and parse playground chapter. #54

ag opened this issue Mar 31, 2017 · 5 comments
Labels

Comments

@ag
Copy link

ag commented Mar 31, 2017

For some reason I am not able to render the book.yaml file

Output

Rendering book.yaml...
Failed to open and parse playground chapter.
/Library/Ruby/Gems/2.0.0/gems/playgroundbook-1.1.0/lib/renderer/playgroundbook_renderer.rb:68:in `block in render': Missing valid playground for Chapter 1. (RuntimeError)
	from /Library/Ruby/Gems/2.0.0/gems/playgroundbook-1.1.0/lib/renderer/playgroundbook_renderer.rb:46:in `map'
	from /Library/Ruby/Gems/2.0.0/gems/playgroundbook-1.1.0/lib/renderer/playgroundbook_renderer.rb:46:in `render'
	from /Library/Ruby/Gems/2.0.0/gems/playgroundbook-1.1.0/bin/playgroundbook:17:in `<top (required)>'
	from /usr/local/bin/playgroundbook:22:in `load'
	from /usr/local/bin/playgroundbook:22:in `<main>'

Note: I wasn't able to install playgroundbook as described in the readme. When I tried to run

sudo gem install playgroundbook

I got this error

ERROR:  While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/playgroundbook

So I had to install it like this

sudo gem install -n /usr/local/bin playgroundbook

Output

Successfully installed playgroundbook-1.1.0
Parsing documentation for playgroundbook-1.1.0
1 gem installed
@ashfurrow ashfurrow added the bug label Mar 31, 2017
@ashfurrow
Copy link
Member

Sorry you're having that issue. It looks like the tool is looking for Chapter 1.xcplayground but can't find it. Would you be able to zip + upload the directory containing your playgrounds and yaml file so we can take a look?

@ag
Copy link
Author

ag commented Mar 31, 2017

Sure! play.zip

@ashfurrow
Copy link
Member

Gotcha, yup. The chapter names defined in book.yaml have to match up to playgrounds that are in the same directory. Here's a directory with the modifications:

play 2.zip

I removed "Chapter 2" and renamed the playground to "Chapter 1".

We really need better documentation and examples around this, because you're not the first person to run into this problem. We're tracking that issue here and would appreciate input or help you could offer (but no pressure!). Hope that works, let us know 👍

@ag
Copy link
Author

ag commented Mar 31, 2017

Oh yeah obviously ;)

Sure I would love to contribute to this project!

Thanks for the great & fast help!

@ashfurrow
Copy link
Member

No problem! You caught me at just the right time 😄 Ideally, we would have a pull request submitted against this repository that adds an example book.yaml, a few chapter playgrounds, and a readme explaining how to render them into a playground book. But if you could do even some of that, it'd be a big help to us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants