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

Can't generate epub: undefined method `to_ios' #25

Closed
yfain opened this issue Mar 30, 2015 · 4 comments
Closed

Can't generate epub: undefined method `to_ios' #25

yfain opened this issue Mar 30, 2015 · 4 comments
Assignees

Comments

@yfain
Copy link

yfain commented Mar 30, 2015

I have a pretty simple adoc file and asciidoctor 1.5.2. Tried to generate epub and got this:

$ asciidoctor-epub3 joiningCTOschool.adoc
undefined method `to_ios' for #Asciidoctor::Epub3::Packager:0x007faf990a79e0
Use --trace for backtrace

Running with --trace produced this:

Yakov:ctoschool yfain11$ asciidoctor-epub3 --trace joiningCTOschool.adoc
/Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:303:in postprocess_xhtml': undefined methodto_ios' for #Asciidoctor::Epub3::Packager:0x007f99db82d288 (NoMethodError)
from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:250:in block (3 levels) in add_content' from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:248:ineach'
from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:248:in each_with_index' from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:248:inblock (2 levels) in add_content'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:40:in instance_eval' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:40:inblock in ordered'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/package.rb:166:in ordered' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/book.rb:205:inordered'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:39:in ordered' from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:245:inblock in add_content'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:33:in instance_eval' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:33:ininitialize'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/builder.rb:292:in new' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/builder.rb:292:inresources'
from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:240:in add_content' from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:422:inblock in package'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/builder.rb:185:in instance_eval' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/builder.rb:185:ininitialize'
from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:340:in new' from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:340:inpackage'
from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/converter.rb:37:in write' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/document.rb:1051:inwrite'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1504:in convert' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:inblock in invoke!'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in each' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:ininvoke!'
from /Users/yfain11/asciidoctor-epub3/bin/asciidoctor-epub3:13:in `

'

@mojavelinux
Copy link
Member

If I remember correctly, Asciidoctor EPUB3 is fussy about having just the right structure for the document. We obviously want to fix this. Until then, refer to the following example and be sure to follow the same structure, working backwards from the example to your doc.

https://github.com/asciidoctor/asciidoctor-epub3/blob/master/data/samples/sample-book.adoc

@mojavelinux
Copy link
Member

To provide some context...Asciidoctor EPUB3 was flexible to handle any AsciiDoc document at one point, but somewhere along the line I broke it. Tests would obviously be a huge benefit here :)

@mojavelinux
Copy link
Member

I have detailed the required structure in the README. See https://github.com/asciidoctor/asciidoctor-epub3#structuring-your-manuscript

@mojavelinux
Copy link
Member

I'm going to close this as a duplicate of #47. It's the same issue.

@mojavelinux mojavelinux added duplicate and removed next labels Apr 9, 2017
@mojavelinux mojavelinux removed this from the v1.5.0 milestone Apr 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants