A newbie question about ASCIIdoc parsing

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

A newbie question about ASCIIdoc parsing

vdanilchenko@vistaprint.com

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

Reply | Threaded
Open this post in threaded view
|

Re: A newbie question about ASCIIdoc parsing

LightGuard
Administrator
Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 

Sent from Mailbox for iPhone


On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!


Reply | Threaded
Open this post in threaded view
|

RE: A newbie question about ASCIIdoc parsing

vdanilchenko@vistaprint.com

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 

Reply | Threaded
Open this post in threaded view
|

RE: A newbie question about ASCIIdoc parsing

LightGuard
Administrator
Require asciidoctor (and any other tools you need like bootstrap, foundation, slim, haml, etc) in _ext/pipeline.rb

Sent from Mailbox for iPhone


On Wed, Feb 19, 2014 at 11:49 AM, Victor Danilchenko <[hidden email]> wrote:

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 


Reply | Threaded
Open this post in threaded view
|

RE: A newbie question about ASCIIdoc parsing

vdanilchenko@vistaprint.com

That makes sense, but when I put it in, I still get the exact same error:

 

$ cat _ext/pipeline.rb

require 'bootstrap-sass'

require 'asciidoctor'

 

Awestruct::Extensions::Pipeline.new do

  # extension Awestruct::Extensions::Posts.new '/news'

  # extension Awestruct::Extensions::Indexifier.new

  # Indexifier *must* come before Atomizer

  # extension Awestruct::Extensions::Atomizer.new :posts, '/feed.atom'

End

 

$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

       ...

 

Simply executing _ext/pipeline.rb doesn’t complain about the asciidoctor include, so at least the include itself is fine; but it still throws the error when I try to start a dev server (both via rake, and directly via awestruct –d, produce the same error).

 

BTW, thanks for your help, I really appreciate it.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 2:18 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Require asciidoctor (and any other tools you need like bootstrap, foundation, slim, haml, etc) in _ext/pipeline.rb


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:49 AM, Victor Danilchenko <[hidden email]> wrote:

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 

 

Reply | Threaded
Open this post in threaded view
|

Re: A newbie question about ASCIIdoc parsing

LightGuard
Administrator
Do you have it in your Gemfile?

Also, have you read http://awestruct.org/getting_started/? If not, that's a good place to start. Also the presentation done by Dan Allen at http://mojavelinux.github.io/decks/docs-workshop/rwx2013/index.html has some great getting started info. If you follow that (I've done it myself a couple of months ago at the conference to validate everything) it should take less than 30 minutes to get a working website setup, running on github pages (if you'd like) and walk you through a basic layout and blog posting.


On Wed, Feb 19, 2014 at 12:53 PM, Victor Danilchenko <[hidden email]> wrote:

That makes sense, but when I put it in, I still get the exact same error:

 

$ cat _ext/pipeline.rb

require 'bootstrap-sass'

require 'asciidoctor'

 

Awestruct::Extensions::Pipeline.new do

  # extension Awestruct::Extensions::Posts.new '/news'

  # extension Awestruct::Extensions::Indexifier.new

  # Indexifier *must* come before Atomizer

  # extension Awestruct::Extensions::Atomizer.new :posts, '/feed.atom'

End

 

$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

       ...

 

Simply executing _ext/pipeline.rb doesn’t complain about the asciidoctor include, so at least the include itself is fine; but it still throws the error when I try to start a dev server (both via rake, and directly via awestruct –d, produce the same error).

 

BTW, thanks for your help, I really appreciate it.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 2:18 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Require asciidoctor (and any other tools you need like bootstrap, foundation, slim, haml, etc) in _ext/pipeline.rb


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:49 AM, Victor Danilchenko <[hidden email]> wrote:

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 

 




--
Reply | Threaded
Open this post in threaded view
|

RE: A newbie question about ASCIIdoc parsing

vdanilchenko@vistaprint.com

Sorry for the delay, I had to finish off another project.

 

Yes, I followed the ‘getting started’ doc. I tried setting up Ruby both from the system packages, and from scratch manually using RVM.

 

What’s more, as of today I have tried doing it in both Fedora and Ubuntu 12.10 – and both give me the same bizarre error, which suggests to me that I am missing something very basic! Yes, I ran ‘rake update’ first.

 

wiki@ubuntu:~/docs$ grep DESCRIPTION /etc/lsb-release

DISTRIB_DESCRIPTION="Ubuntu 12.10"

wiki@ubuntu:~/docs$ rake

/var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

        from /var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

        from /var/lib/gems/1.9.1/gems/awestruct-0.5.3/lib/awestruct/handlers/template/asciidoc.rb:4:in `<module:Tilt>'

wiki@ubuntu:~/docs$ gem list asciidoctor

 

*** LOCAL GEMS ***

 

asciidoctor (0.1.4)

 

This was a completely new Ubuntu instance, installed from scratch. In this one, I have used the distro packages whenever possible, but I also did RVM installation on a Fedora VM, and a package installation as well, and I keep getting this same error: cannot load such file -- asciidoctor

 

Any ideas on what I might be doing wrong? Given that this same problem occurred on two completely different pristine distro installations (Fedora and Ubuntu), I am completely baffled. Simply including ‘asciidoctor’ in a .rb file works fine…

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 3:18 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Do you have it in your Gemfile?

 

Also, have you read http://awestruct.org/getting_started/? If not, that's a good place to start. Also the presentation done by Dan Allen at http://mojavelinux.github.io/decks/docs-workshop/rwx2013/index.html has some great getting started info. If you follow that (I've done it myself a couple of months ago at the conference to validate everything) it should take less than 30 minutes to get a working website setup, running on github pages (if you'd like) and walk you through a basic layout and blog posting.

 

On Wed, Feb 19, 2014 at 12:53 PM, Victor Danilchenko <[hidden email]> wrote:

That makes sense, but when I put it in, I still get the exact same error:

 

$ cat _ext/pipeline.rb

require 'bootstrap-sass'

require 'asciidoctor'

 

Awestruct::Extensions::Pipeline.new do

  # extension Awestruct::Extensions::Posts.new '/news'

  # extension Awestruct::Extensions::Indexifier.new

  # Indexifier *must* come before Atomizer

  # extension Awestruct::Extensions::Atomizer.new :posts, '/feed.atom'

End

 

$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

       ...

 

Simply executing _ext/pipeline.rb doesn’t complain about the asciidoctor include, so at least the include itself is fine; but it still throws the error when I try to start a dev server (both via rake, and directly via awestruct –d, produce the same error).

 

BTW, thanks for your help, I really appreciate it.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 2:18 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Require asciidoctor (and any other tools you need like bootstrap, foundation, slim, haml, etc) in _ext/pipeline.rb


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:49 AM, Victor Danilchenko <[hidden email]> wrote:

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 

 



 

--

Reply | Threaded
Open this post in threaded view
|

RE: A newbie question about ASCIIdoc parsing

LightGuard
Administrator
Interesting. You have the gem installed on the system, it's in the Gemfile, do you also have the `require 'asciidoctor'` statement in the pipeline.rb file? 

This is very odd. Try contacting me off list with a zip of your project and I'll take a look on my setup and see if I can see anything. 

Sent from Mailbox for iPhone


On Sat, Mar 8, 2014 at 1:15 PM, Victor Danilchenko <[hidden email]> wrote:

Sorry for the delay, I had to finish off another project.

 

Yes, I followed the ‘getting started’ doc. I tried setting up Ruby both from the system packages, and from scratch manually using RVM.

 

What’s more, as of today I have tried doing it in both Fedora and Ubuntu 12.10 – and both give me the same bizarre error, which suggests to me that I am missing something very basic! Yes, I ran ‘rake update’ first.

 

wiki@ubuntu:~/docs$ grep DESCRIPTION /etc/lsb-release

DISTRIB_DESCRIPTION="Ubuntu 12.10"

wiki@ubuntu:~/docs$ rake

/var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

        from /var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

        from /var/lib/gems/1.9.1/gems/awestruct-0.5.3/lib/awestruct/handlers/template/asciidoc.rb:4:in `<module:Tilt>'

wiki@ubuntu:~/docs$ gem list asciidoctor

 

*** LOCAL GEMS ***

 

asciidoctor (0.1.4)

 

This was a completely new Ubuntu instance, installed from scratch. In this one, I have used the distro packages whenever possible, but I also did RVM installation on a Fedora VM, and a package installation as well, and I keep getting this same error: cannot load such file -- asciidoctor

 

Any ideas on what I might be doing wrong? Given that this same problem occurred on two completely different pristine distro installations (Fedora and Ubuntu), I am completely baffled. Simply including ‘asciidoctor’ in a .rb file works fine…

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 3:18 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Do you have it in your Gemfile?

 

Also, have you read http://awestruct.org/getting_started/? If not, that's a good place to start. Also the presentation done by Dan Allen at http://mojavelinux.github.io/decks/docs-workshop/rwx2013/index.html has some great getting started info. If you follow that (I've done it myself a couple of months ago at the conference to validate everything) it should take less than 30 minutes to get a working website setup, running on github pages (if you'd like) and walk you through a basic layout and blog posting.

 

On Wed, Feb 19, 2014 at 12:53 PM, Victor Danilchenko <[hidden email]> wrote:

That makes sense, but when I put it in, I still get the exact same error:

 

$ cat _ext/pipeline.rb

require 'bootstrap-sass'

require 'asciidoctor'

 

Awestruct::Extensions::Pipeline.new do

  # extension Awestruct::Extensions::Posts.new '/news'

  # extension Awestruct::Extensions::Indexifier.new

  # Indexifier *must* come before Atomizer

  # extension Awestruct::Extensions::Atomizer.new :posts, '/feed.atom'

End

 

$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

       ...

 

Simply executing _ext/pipeline.rb doesn’t complain about the asciidoctor include, so at least the include itself is fine; but it still throws the error when I try to start a dev server (both via rake, and directly via awestruct –d, produce the same error).

 

BTW, thanks for your help, I really appreciate it.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 2:18 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Require asciidoctor (and any other tools you need like bootstrap, foundation, slim, haml, etc) in _ext/pipeline.rb


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:49 AM, Victor Danilchenko <[hidden email]> wrote:

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 

 



 

--


Reply | Threaded
Open this post in threaded view
|

RE: A newbie question about ASCIIdoc parsing

vdanilchenko@vistaprint.com

Yes, I have ‘require asciidoctor’ in the pipeline.rb.

 

I will send you my project tree, but given that this is a brand spanking new one just generated by ‘awestruct -i -f bootstrap’ (and with asciidoctor stuff added to site.yaml and pipeline.rb), I am not sure how much good it will do. Archive incoming in a few minutes.

 

Many thanks for your help.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Saturday, March 08, 2014 3:22 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Interesting. You have the gem installed on the system, it's in the Gemfile, do you also have the `require 'asciidoctor'` statement in the pipeline.rb file? 

 

This is very odd. Try contacting me off list with a zip of your project and I'll take a look on my setup and see if I can see anything. 


Sent from Mailbox for iPhone

 

On Sat, Mar 8, 2014 at 1:15 PM, Victor Danilchenko <[hidden email]> wrote:

Sorry for the delay, I had to finish off another project.

 

Yes, I followed the ‘getting started’ doc. I tried setting up Ruby both from the system packages, and from scratch manually using RVM.

 

What’s more, as of today I have tried doing it in both Fedora and Ubuntu 12.10 – and both give me the same bizarre error, which suggests to me that I am missing something very basic! Yes, I ran ‘rake update’ first.

 

wiki@ubuntu:~/docs$ grep DESCRIPTION /etc/lsb-release

DISTRIB_DESCRIPTION="Ubuntu 12.10"

wiki@ubuntu:~/docs$ rake

/var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

        from /var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

        from /var/lib/gems/1.9.1/gems/awestruct-0.5.3/lib/awestruct/handlers/template/asciidoc.rb:4:in `<module:Tilt>'

wiki@ubuntu:~/docs$ gem list asciidoctor

 

*** LOCAL GEMS ***

 

asciidoctor (0.1.4)

 

This was a completely new Ubuntu instance, installed from scratch. In this one, I have used the distro packages whenever possible, but I also did RVM installation on a Fedora VM, and a package installation as well, and I keep getting this same error: cannot load such file -- asciidoctor

 

Any ideas on what I might be doing wrong? Given that this same problem occurred on two completely different pristine distro installations (Fedora and Ubuntu), I am completely baffled. Simply including ‘asciidoctor’ in a .rb file works fine…

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 3:18 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Do you have it in your Gemfile?

 

Also, have you read http://awestruct.org/getting_started/? If not, that's a good place to start. Also the presentation done by Dan Allen at http://mojavelinux.github.io/decks/docs-workshop/rwx2013/index.html has some great getting started info. If you follow that (I've done it myself a couple of months ago at the conference to validate everything) it should take less than 30 minutes to get a working website setup, running on github pages (if you'd like) and walk you through a basic layout and blog posting.

 

On Wed, Feb 19, 2014 at 12:53 PM, Victor Danilchenko <[hidden email]> wrote:

That makes sense, but when I put it in, I still get the exact same error:

 

$ cat _ext/pipeline.rb

require 'bootstrap-sass'

require 'asciidoctor'

 

Awestruct::Extensions::Pipeline.new do

  # extension Awestruct::Extensions::Posts.new '/news'

  # extension Awestruct::Extensions::Indexifier.new

  # Indexifier *must* come before Atomizer

  # extension Awestruct::Extensions::Atomizer.new :posts, '/feed.atom'

End

 

$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

       ...

 

Simply executing _ext/pipeline.rb doesn’t complain about the asciidoctor include, so at least the include itself is fine; but it still throws the error when I try to start a dev server (both via rake, and directly via awestruct –d, produce the same error).

 

BTW, thanks for your help, I really appreciate it.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 2:18 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Require asciidoctor (and any other tools you need like bootstrap, foundation, slim, haml, etc) in _ext/pipeline.rb


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:49 AM, Victor Danilchenko <[hidden email]> wrote:

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 

 



 

--

 

Reply | Threaded
Open this post in threaded view
|

Re: A newbie question about ASCIIdoc parsing

LightGuard
Administrator
Follow-up for the list to close the loop:

The Gemfile that's generated has all dependencies but awestruct and rake commented out. You have to uncomment the ones you want to use.


On Mon, Mar 10, 2014 at 10:51 AM, Victor Danilchenko <[hidden email]> wrote:

Yes, I have ‘require asciidoctor’ in the pipeline.rb.

 

I will send you my project tree, but given that this is a brand spanking new one just generated by ‘awestruct -i -f bootstrap’ (and with asciidoctor stuff added to site.yaml and pipeline.rb), I am not sure how much good it will do. Archive incoming in a few minutes.

 

Many thanks for your help.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Saturday, March 08, 2014 3:22 PM


To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Interesting. You have the gem installed on the system, it's in the Gemfile, do you also have the `require 'asciidoctor'` statement in the pipeline.rb file? 

 

This is very odd. Try contacting me off list with a zip of your project and I'll take a look on my setup and see if I can see anything. 


Sent from Mailbox for iPhone

 

On Sat, Mar 8, 2014 at 1:15 PM, Victor Danilchenko <[hidden email]> wrote:

Sorry for the delay, I had to finish off another project.

 

Yes, I followed the ‘getting started’ doc. I tried setting up Ruby both from the system packages, and from scratch manually using RVM.

 

What’s more, as of today I have tried doing it in both Fedora and Ubuntu 12.10 – and both give me the same bizarre error, which suggests to me that I am missing something very basic! Yes, I ran ‘rake update’ first.

 

wiki@ubuntu:~/docs$ grep DESCRIPTION /etc/lsb-release

DISTRIB_DESCRIPTION="Ubuntu 12.10"

wiki@ubuntu:~/docs$ rake

/var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

        from /var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

        from /var/lib/gems/1.9.1/gems/awestruct-0.5.3/lib/awestruct/handlers/template/asciidoc.rb:4:in `<module:Tilt>'

wiki@ubuntu:~/docs$ gem list asciidoctor

 

*** LOCAL GEMS ***

 

asciidoctor (0.1.4)

 

This was a completely new Ubuntu instance, installed from scratch. In this one, I have used the distro packages whenever possible, but I also did RVM installation on a Fedora VM, and a package installation as well, and I keep getting this same error: cannot load such file -- asciidoctor

 

Any ideas on what I might be doing wrong? Given that this same problem occurred on two completely different pristine distro installations (Fedora and Ubuntu), I am completely baffled. Simply including ‘asciidoctor’ in a .rb file works fine…

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 3:18 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Do you have it in your Gemfile?

 

Also, have you read http://awestruct.org/getting_started/? If not, that's a good place to start. Also the presentation done by Dan Allen at http://mojavelinux.github.io/decks/docs-workshop/rwx2013/index.html has some great getting started info. If you follow that (I've done it myself a couple of months ago at the conference to validate everything) it should take less than 30 minutes to get a working website setup, running on github pages (if you'd like) and walk you through a basic layout and blog posting.

 

On Wed, Feb 19, 2014 at 12:53 PM, Victor Danilchenko <[hidden email]> wrote:

That makes sense, but when I put it in, I still get the exact same error:

 

$ cat _ext/pipeline.rb

require 'bootstrap-sass'

require 'asciidoctor'

 

Awestruct::Extensions::Pipeline.new do

  # extension Awestruct::Extensions::Posts.new '/news'

  # extension Awestruct::Extensions::Indexifier.new

  # Indexifier *must* come before Atomizer

  # extension Awestruct::Extensions::Atomizer.new :posts, '/feed.atom'

End

 

$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

       ...

 

Simply executing _ext/pipeline.rb doesn’t complain about the asciidoctor include, so at least the include itself is fine; but it still throws the error when I try to start a dev server (both via rake, and directly via awestruct –d, produce the same error).

 

BTW, thanks for your help, I really appreciate it.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 2:18 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Require asciidoctor (and any other tools you need like bootstrap, foundation, slim, haml, etc) in _ext/pipeline.rb


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:49 AM, Victor Danilchenko <[hidden email]> wrote:

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 

 



 

--

 




--
Reply | Threaded
Open this post in threaded view
|

RE: A newbie question about ASCIIdoc parsing

vdanilchenko@vistaprint.com
In reply to this post by vdanilchenko@vistaprint.com

Well, I kinda-sorta managed to get it to run. Turns out that in the file  gems/tilt-2.0.0/lib/tilt/asciidoc.rb, when it was doing “require ‘asciidoctor’”, the asciidoctor load path wasn’t in fact in the $LOAD_PATH variable. I fixed it with brute force, by prepending the following line there:

 

$:.push ("/usr/local/rvm/gems/ruby-1.9.3-p484/gems/asciidoctor-0.1.4/lib")

 

After I did that, and also downgrading the ‘listen’ gem to 1.3.1, I was able to run the site (a method call on listen was failing in version 2.0).

 

This looks to me like there’s some gem versioning conflicts going on. SO right now my devel site is running, and the Asciidoctor module is actually processing asciidoc directives.

 

Many thanks for your help! And if you have some ideas about why the asciidoctor path suddenly vanished from $LOAD_PATH, I would very much appreciate it.

 

 

 

From: Victor Danilchenko
Sent: Monday, March 10, 2014 12:51 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Yes, I have ‘require asciidoctor’ in the pipeline.rb.

 

I will send you my project tree, but given that this is a brand spanking new one just generated by ‘awestruct -i -f bootstrap’ (and with asciidoctor stuff added to site.yaml and pipeline.rb), I am not sure how much good it will do. Archive incoming in a few minutes.

 

Many thanks for your help.

 

 

 

From: Jason Porter [[hidden email]]
Sent: Saturday, March 08, 2014 3:22 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Interesting. You have the gem installed on the system, it's in the Gemfile, do you also have the `require 'asciidoctor'` statement in the pipeline.rb file? 

 

This is very odd. Try contacting me off list with a zip of your project and I'll take a look on my setup and see if I can see anything. 


Sent from Mailbox for iPhone

 

On Sat, Mar 8, 2014 at 1:15 PM, Victor Danilchenko <[hidden email]> wrote:

Sorry for the delay, I had to finish off another project.

 

Yes, I followed the ‘getting started’ doc. I tried setting up Ruby both from the system packages, and from scratch manually using RVM.

 

What’s more, as of today I have tried doing it in both Fedora and Ubuntu 12.10 – and both give me the same bizarre error, which suggests to me that I am missing something very basic! Yes, I ran ‘rake update’ first.

 

wiki@ubuntu:~/docs$ grep DESCRIPTION /etc/lsb-release

DISTRIB_DESCRIPTION="Ubuntu 12.10"

wiki@ubuntu:~/docs$ rake

/var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

        from /var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

        from /var/lib/gems/1.9.1/gems/awestruct-0.5.3/lib/awestruct/handlers/template/asciidoc.rb:4:in `<module:Tilt>'

wiki@ubuntu:~/docs$ gem list asciidoctor

 

*** LOCAL GEMS ***

 

asciidoctor (0.1.4)

 

This was a completely new Ubuntu instance, installed from scratch. In this one, I have used the distro packages whenever possible, but I also did RVM installation on a Fedora VM, and a package installation as well, and I keep getting this same error: cannot load such file -- asciidoctor

 

Any ideas on what I might be doing wrong? Given that this same problem occurred on two completely different pristine distro installations (Fedora and Ubuntu), I am completely baffled. Simply including ‘asciidoctor’ in a .rb file works fine…

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 3:18 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Do you have it in your Gemfile?

 

Also, have you read http://awestruct.org/getting_started/? If not, that's a good place to start. Also the presentation done by Dan Allen at http://mojavelinux.github.io/decks/docs-workshop/rwx2013/index.html has some great getting started info. If you follow that (I've done it myself a couple of months ago at the conference to validate everything) it should take less than 30 minutes to get a working website setup, running on github pages (if you'd like) and walk you through a basic layout and blog posting.

 

On Wed, Feb 19, 2014 at 12:53 PM, Victor Danilchenko <[hidden email]> wrote:

That makes sense, but when I put it in, I still get the exact same error:

 

$ cat _ext/pipeline.rb

require 'bootstrap-sass'

require 'asciidoctor'

 

Awestruct::Extensions::Pipeline.new do

  # extension Awestruct::Extensions::Posts.new '/news'

  # extension Awestruct::Extensions::Indexifier.new

  # Indexifier *must* come before Atomizer

  # extension Awestruct::Extensions::Atomizer.new :posts, '/feed.atom'

End

 

$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

       ...

 

Simply executing _ext/pipeline.rb doesn’t complain about the asciidoctor include, so at least the include itself is fine; but it still throws the error when I try to start a dev server (both via rake, and directly via awestruct –d, produce the same error).

 

BTW, thanks for your help, I really appreciate it.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 2:18 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Require asciidoctor (and any other tools you need like bootstrap, foundation, slim, haml, etc) in _ext/pipeline.rb


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:49 AM, Victor Danilchenko <[hidden email]> wrote:

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 

 



 

--

 

Reply | Threaded
Open this post in threaded view
|

Re: A newbie question about ASCIIdoc parsing

LightGuard
Administrator
Nope, that's a bit odd. If you'd like to test the latest RC (0.5.4.rc4) please let us know of any problems. It would just be a change in the version to the awestruct gem in the Gemfile, however, given how difficult it's been to get things up and running, I can understand not wanting to :)


On Mon, Mar 10, 2014 at 12:24 PM, Victor Danilchenko <[hidden email]> wrote:

Well, I kinda-sorta managed to get it to run. Turns out that in the file  gems/tilt-2.0.0/lib/tilt/asciidoc.rb, when it was doing “require ‘asciidoctor’”, the asciidoctor load path wasn’t in fact in the $LOAD_PATH variable. I fixed it with brute force, by prepending the following line there:

 

$:.push ("/usr/local/rvm/gems/ruby-1.9.3-p484/gems/asciidoctor-0.1.4/lib")

 

After I did that, and also downgrading the ‘listen’ gem to 1.3.1, I was able to run the site (a method call on listen was failing in version 2.0).

 

This looks to me like there’s some gem versioning conflicts going on. SO right now my devel site is running, and the Asciidoctor module is actually processing asciidoc directives.

 

Many thanks for your help! And if you have some ideas about why the asciidoctor path suddenly vanished from $LOAD_PATH, I would very much appreciate it.

 

 

 

From: Victor Danilchenko
Sent: Monday, March 10, 2014 12:51 PM


To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Yes, I have ‘require asciidoctor’ in the pipeline.rb.

 

I will send you my project tree, but given that this is a brand spanking new one just generated by ‘awestruct -i -f bootstrap’ (and with asciidoctor stuff added to site.yaml and pipeline.rb), I am not sure how much good it will do. Archive incoming in a few minutes.

 

Many thanks for your help.

 

 

 

From: Jason Porter [[hidden email]]
Sent: Saturday, March 08, 2014 3:22 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Interesting. You have the gem installed on the system, it's in the Gemfile, do you also have the `require 'asciidoctor'` statement in the pipeline.rb file? 

 

This is very odd. Try contacting me off list with a zip of your project and I'll take a look on my setup and see if I can see anything. 


Sent from Mailbox for iPhone

 

On Sat, Mar 8, 2014 at 1:15 PM, Victor Danilchenko <[hidden email]> wrote:

Sorry for the delay, I had to finish off another project.

 

Yes, I followed the ‘getting started’ doc. I tried setting up Ruby both from the system packages, and from scratch manually using RVM.

 

What’s more, as of today I have tried doing it in both Fedora and Ubuntu 12.10 – and both give me the same bizarre error, which suggests to me that I am missing something very basic! Yes, I ran ‘rake update’ first.

 

wiki@ubuntu:~/docs$ grep DESCRIPTION /etc/lsb-release

DISTRIB_DESCRIPTION="Ubuntu 12.10"

wiki@ubuntu:~/docs$ rake

/var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

        from /var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

        from /var/lib/gems/1.9.1/gems/awestruct-0.5.3/lib/awestruct/handlers/template/asciidoc.rb:4:in `<module:Tilt>'

wiki@ubuntu:~/docs$ gem list asciidoctor

 

*** LOCAL GEMS ***

 

asciidoctor (0.1.4)

 

This was a completely new Ubuntu instance, installed from scratch. In this one, I have used the distro packages whenever possible, but I also did RVM installation on a Fedora VM, and a package installation as well, and I keep getting this same error: cannot load such file -- asciidoctor

 

Any ideas on what I might be doing wrong? Given that this same problem occurred on two completely different pristine distro installations (Fedora and Ubuntu), I am completely baffled. Simply including ‘asciidoctor’ in a .rb file works fine…

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 3:18 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Do you have it in your Gemfile?

 

Also, have you read http://awestruct.org/getting_started/? If not, that's a good place to start. Also the presentation done by Dan Allen at http://mojavelinux.github.io/decks/docs-workshop/rwx2013/index.html has some great getting started info. If you follow that (I've done it myself a couple of months ago at the conference to validate everything) it should take less than 30 minutes to get a working website setup, running on github pages (if you'd like) and walk you through a basic layout and blog posting.

 

On Wed, Feb 19, 2014 at 12:53 PM, Victor Danilchenko <[hidden email]> wrote:

That makes sense, but when I put it in, I still get the exact same error:

 

$ cat _ext/pipeline.rb

require 'bootstrap-sass'

require 'asciidoctor'

 

Awestruct::Extensions::Pipeline.new do

  # extension Awestruct::Extensions::Posts.new '/news'

  # extension Awestruct::Extensions::Indexifier.new

  # Indexifier *must* come before Atomizer

  # extension Awestruct::Extensions::Atomizer.new :posts, '/feed.atom'

End

 

$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

       ...

 

Simply executing _ext/pipeline.rb doesn’t complain about the asciidoctor include, so at least the include itself is fine; but it still throws the error when I try to start a dev server (both via rake, and directly via awestruct –d, produce the same error).

 

BTW, thanks for your help, I really appreciate it.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 2:18 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Require asciidoctor (and any other tools you need like bootstrap, foundation, slim, haml, etc) in _ext/pipeline.rb


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:49 AM, Victor Danilchenko <[hidden email]> wrote:

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 

 



 

--

 




--
Reply | Threaded
Open this post in threaded view
|

RE: A newbie question about ASCIIdoc parsing

vdanilchenko@vistaprint.com
In reply to this post by LightGuard

Doh. Thanks. Weird though – the reason I hadn’t done it is because I was trying to use the system package gems instead of the manually installed ones. I guess it was a bad idea… Thanks again.

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Monday, March 10, 2014 1:19 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Follow-up for the list to close the loop:

 

The Gemfile that's generated has all dependencies but awestruct and rake commented out. You have to uncomment the ones you want to use.

 

On Mon, Mar 10, 2014 at 10:51 AM, Victor Danilchenko <[hidden email]> wrote:

Yes, I have ‘require asciidoctor’ in the pipeline.rb.

 

I will send you my project tree, but given that this is a brand spanking new one just generated by ‘awestruct -i -f bootstrap’ (and with asciidoctor stuff added to site.yaml and pipeline.rb), I am not sure how much good it will do. Archive incoming in a few minutes.

 

Many thanks for your help.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Saturday, March 08, 2014 3:22 PM


To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Interesting. You have the gem installed on the system, it's in the Gemfile, do you also have the `require 'asciidoctor'` statement in the pipeline.rb file? 

 

This is very odd. Try contacting me off list with a zip of your project and I'll take a look on my setup and see if I can see anything. 


Sent from Mailbox for iPhone

 

On Sat, Mar 8, 2014 at 1:15 PM, Victor Danilchenko <[hidden email]> wrote:

Sorry for the delay, I had to finish off another project.

 

Yes, I followed the ‘getting started’ doc. I tried setting up Ruby both from the system packages, and from scratch manually using RVM.

 

What’s more, as of today I have tried doing it in both Fedora and Ubuntu 12.10 – and both give me the same bizarre error, which suggests to me that I am missing something very basic! Yes, I ran ‘rake update’ first.

 

wiki@ubuntu:~/docs$ grep DESCRIPTION /etc/lsb-release

DISTRIB_DESCRIPTION="Ubuntu 12.10"

wiki@ubuntu:~/docs$ rake

/var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

        from /var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

        from /var/lib/gems/1.9.1/gems/awestruct-0.5.3/lib/awestruct/handlers/template/asciidoc.rb:4:in `<module:Tilt>'

wiki@ubuntu:~/docs$ gem list asciidoctor

 

*** LOCAL GEMS ***

 

asciidoctor (0.1.4)

 

This was a completely new Ubuntu instance, installed from scratch. In this one, I have used the distro packages whenever possible, but I also did RVM installation on a Fedora VM, and a package installation as well, and I keep getting this same error: cannot load such file -- asciidoctor

 

Any ideas on what I might be doing wrong? Given that this same problem occurred on two completely different pristine distro installations (Fedora and Ubuntu), I am completely baffled. Simply including ‘asciidoctor’ in a .rb file works fine…

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 3:18 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Do you have it in your Gemfile?

 

Also, have you read http://awestruct.org/getting_started/? If not, that's a good place to start. Also the presentation done by Dan Allen at http://mojavelinux.github.io/decks/docs-workshop/rwx2013/index.html has some great getting started info. If you follow that (I've done it myself a couple of months ago at the conference to validate everything) it should take less than 30 minutes to get a working website setup, running on github pages (if you'd like) and walk you through a basic layout and blog posting.

 

On Wed, Feb 19, 2014 at 12:53 PM, Victor Danilchenko <[hidden email]> wrote:

That makes sense, but when I put it in, I still get the exact same error:

 

$ cat _ext/pipeline.rb

require 'bootstrap-sass'

require 'asciidoctor'

 

Awestruct::Extensions::Pipeline.new do

  # extension Awestruct::Extensions::Posts.new '/news'

  # extension Awestruct::Extensions::Indexifier.new

  # Indexifier *must* come before Atomizer

  # extension Awestruct::Extensions::Atomizer.new :posts, '/feed.atom'

End

 

$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

       ...

 

Simply executing _ext/pipeline.rb doesn’t complain about the asciidoctor include, so at least the include itself is fine; but it still throws the error when I try to start a dev server (both via rake, and directly via awestruct –d, produce the same error).

 

BTW, thanks for your help, I really appreciate it.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 2:18 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Require asciidoctor (and any other tools you need like bootstrap, foundation, slim, haml, etc) in _ext/pipeline.rb


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:49 AM, Victor Danilchenko <[hidden email]> wrote:

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 

 



 

--

 



 

--

Reply | Threaded
Open this post in threaded view
|

Re: A newbie question about ASCIIdoc parsing

LightGuard
Administrator
Yeah, with Ruby, you're better off NOT to use the system packages.


On Mon, Mar 10, 2014 at 12:40 PM, Victor Danilchenko <[hidden email]> wrote:

Doh. Thanks. Weird though – the reason I hadn’t done it is because I was trying to use the system package gems instead of the manually installed ones. I guess it was a bad idea… Thanks again.

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Monday, March 10, 2014 1:19 PM


To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Follow-up for the list to close the loop:

 

The Gemfile that's generated has all dependencies but awestruct and rake commented out. You have to uncomment the ones you want to use.

 

On Mon, Mar 10, 2014 at 10:51 AM, Victor Danilchenko <[hidden email]> wrote:

Yes, I have ‘require asciidoctor’ in the pipeline.rb.

 

I will send you my project tree, but given that this is a brand spanking new one just generated by ‘awestruct -i -f bootstrap’ (and with asciidoctor stuff added to site.yaml and pipeline.rb), I am not sure how much good it will do. Archive incoming in a few minutes.

 

Many thanks for your help.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Saturday, March 08, 2014 3:22 PM


To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Interesting. You have the gem installed on the system, it's in the Gemfile, do you also have the `require 'asciidoctor'` statement in the pipeline.rb file? 

 

This is very odd. Try contacting me off list with a zip of your project and I'll take a look on my setup and see if I can see anything. 


Sent from Mailbox for iPhone

 

On Sat, Mar 8, 2014 at 1:15 PM, Victor Danilchenko <[hidden email]> wrote:

Sorry for the delay, I had to finish off another project.

 

Yes, I followed the ‘getting started’ doc. I tried setting up Ruby both from the system packages, and from scratch manually using RVM.

 

What’s more, as of today I have tried doing it in both Fedora and Ubuntu 12.10 – and both give me the same bizarre error, which suggests to me that I am missing something very basic! Yes, I ran ‘rake update’ first.

 

wiki@ubuntu:~/docs$ grep DESCRIPTION /etc/lsb-release

DISTRIB_DESCRIPTION="Ubuntu 12.10"

wiki@ubuntu:~/docs$ rake

/var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

        from /var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

        from /var/lib/gems/1.9.1/gems/awestruct-0.5.3/lib/awestruct/handlers/template/asciidoc.rb:4:in `<module:Tilt>'

wiki@ubuntu:~/docs$ gem list asciidoctor

 

*** LOCAL GEMS ***

 

asciidoctor (0.1.4)

 

This was a completely new Ubuntu instance, installed from scratch. In this one, I have used the distro packages whenever possible, but I also did RVM installation on a Fedora VM, and a package installation as well, and I keep getting this same error: cannot load such file -- asciidoctor

 

Any ideas on what I might be doing wrong? Given that this same problem occurred on two completely different pristine distro installations (Fedora and Ubuntu), I am completely baffled. Simply including ‘asciidoctor’ in a .rb file works fine…

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 3:18 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Do you have it in your Gemfile?

 

Also, have you read http://awestruct.org/getting_started/? If not, that's a good place to start. Also the presentation done by Dan Allen at http://mojavelinux.github.io/decks/docs-workshop/rwx2013/index.html has some great getting started info. If you follow that (I've done it myself a couple of months ago at the conference to validate everything) it should take less than 30 minutes to get a working website setup, running on github pages (if you'd like) and walk you through a basic layout and blog posting.

 

On Wed, Feb 19, 2014 at 12:53 PM, Victor Danilchenko <[hidden email]> wrote:

That makes sense, but when I put it in, I still get the exact same error:

 

$ cat _ext/pipeline.rb

require 'bootstrap-sass'

require 'asciidoctor'

 

Awestruct::Extensions::Pipeline.new do

  # extension Awestruct::Extensions::Posts.new '/news'

  # extension Awestruct::Extensions::Indexifier.new

  # Indexifier *must* come before Atomizer

  # extension Awestruct::Extensions::Atomizer.new :posts, '/feed.atom'

End

 

$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

       ...

 

Simply executing _ext/pipeline.rb doesn’t complain about the asciidoctor include, so at least the include itself is fine; but it still throws the error when I try to start a dev server (both via rake, and directly via awestruct –d, produce the same error).

 

BTW, thanks for your help, I really appreciate it.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 2:18 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Require asciidoctor (and any other tools you need like bootstrap, foundation, slim, haml, etc) in _ext/pipeline.rb


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:49 AM, Victor Danilchenko <[hidden email]> wrote:

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 

 



 

--

 



 

--




--
Reply | Threaded
Open this post in threaded view
|

RE: A newbie question about ASCIIdoc parsing

vdanilchenko@vistaprint.com

Gotcha. I still have to use the system Ruby (for Puppet), but I will go with all the manually built gems. Thanks.

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Monday, March 10, 2014 2:41 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Yeah, with Ruby, you're better off NOT to use the system packages.

 

On Mon, Mar 10, 2014 at 12:40 PM, Victor Danilchenko <[hidden email]> wrote:

Doh. Thanks. Weird though – the reason I hadn’t done it is because I was trying to use the system package gems instead of the manually installed ones. I guess it was a bad idea… Thanks again.

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Monday, March 10, 2014 1:19 PM


To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Follow-up for the list to close the loop:

 

The Gemfile that's generated has all dependencies but awestruct and rake commented out. You have to uncomment the ones you want to use.

 

On Mon, Mar 10, 2014 at 10:51 AM, Victor Danilchenko <[hidden email]> wrote:

Yes, I have ‘require asciidoctor’ in the pipeline.rb.

 

I will send you my project tree, but given that this is a brand spanking new one just generated by ‘awestruct -i -f bootstrap’ (and with asciidoctor stuff added to site.yaml and pipeline.rb), I am not sure how much good it will do. Archive incoming in a few minutes.

 

Many thanks for your help.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Saturday, March 08, 2014 3:22 PM


To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Interesting. You have the gem installed on the system, it's in the Gemfile, do you also have the `require 'asciidoctor'` statement in the pipeline.rb file? 

 

This is very odd. Try contacting me off list with a zip of your project and I'll take a look on my setup and see if I can see anything. 


Sent from Mailbox for iPhone

 

On Sat, Mar 8, 2014 at 1:15 PM, Victor Danilchenko <[hidden email]> wrote:

Sorry for the delay, I had to finish off another project.

 

Yes, I followed the ‘getting started’ doc. I tried setting up Ruby both from the system packages, and from scratch manually using RVM.

 

What’s more, as of today I have tried doing it in both Fedora and Ubuntu 12.10 – and both give me the same bizarre error, which suggests to me that I am missing something very basic! Yes, I ran ‘rake update’ first.

 

wiki@ubuntu:~/docs$ grep DESCRIPTION /etc/lsb-release

DISTRIB_DESCRIPTION="Ubuntu 12.10"

wiki@ubuntu:~/docs$ rake

/var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

        from /var/lib/gems/1.9.1/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

        from /var/lib/gems/1.9.1/gems/awestruct-0.5.3/lib/awestruct/handlers/template/asciidoc.rb:4:in `<module:Tilt>'

wiki@ubuntu:~/docs$ gem list asciidoctor

 

*** LOCAL GEMS ***

 

asciidoctor (0.1.4)

 

This was a completely new Ubuntu instance, installed from scratch. In this one, I have used the distro packages whenever possible, but I also did RVM installation on a Fedora VM, and a package installation as well, and I keep getting this same error: cannot load such file -- asciidoctor

 

Any ideas on what I might be doing wrong? Given that this same problem occurred on two completely different pristine distro installations (Fedora and Ubuntu), I am completely baffled. Simply including ‘asciidoctor’ in a .rb file works fine…

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 3:18 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Do you have it in your Gemfile?

 

Also, have you read http://awestruct.org/getting_started/? If not, that's a good place to start. Also the presentation done by Dan Allen at http://mojavelinux.github.io/decks/docs-workshop/rwx2013/index.html has some great getting started info. If you follow that (I've done it myself a couple of months ago at the conference to validate everything) it should take less than 30 minutes to get a working website setup, running on github pages (if you'd like) and walk you through a basic layout and blog posting.

 

On Wed, Feb 19, 2014 at 12:53 PM, Victor Danilchenko <[hidden email]> wrote:

That makes sense, but when I put it in, I still get the exact same error:

 

$ cat _ext/pipeline.rb

require 'bootstrap-sass'

require 'asciidoctor'

 

Awestruct::Extensions::Pipeline.new do

  # extension Awestruct::Extensions::Posts.new '/news'

  # extension Awestruct::Extensions::Indexifier.new

  # Indexifier *must* come before Atomizer

  # extension Awestruct::Extensions::Atomizer.new :posts, '/feed.atom'

End

 

$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

       ...

 

Simply executing _ext/pipeline.rb doesn’t complain about the asciidoctor include, so at least the include itself is fine; but it still throws the error when I try to start a dev server (both via rake, and directly via awestruct –d, produce the same error).

 

BTW, thanks for your help, I really appreciate it.

 

 

 

From: Jason Porter [mailto:[hidden email]]
Sent: Wednesday, February 19, 2014 2:18 PM
To: [hidden email]
Subject: RE: [awestruct] A newbie question about ASCIIdoc parsing

 

Require asciidoctor (and any other tools you need like bootstrap, foundation, slim, haml, etc) in _ext/pipeline.rb


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:49 AM, Victor Danilchenko <[hidden email]> wrote:

I was afraid of that.

 

I had tried installing the latest Awestruct on a Fedora 20 VM, and have had absolutely no luck. When I installed everything I could from RPMs, and then the rest via gem (preferred from sysadmin perspective), the end result was nokogiri complaining about being unable to find nokogiri. So I scrapped the whole thing and tried to install everything, including Ruby itself, from scratch using rvm – and now it claims it can’t find Asciidoctor:

 

$ ruby --version

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

$ gem list | grep asciidoctor

asciidoctor (0.1.4)

$ ls -l

total 48

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:48 _config

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _ext

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 fonts

-rw-rw-r--. 1 wiki wiki 2381 Feb 19 09:47 Gemfile

-rw-rw-r--. 1 wiki wiki 1376 Feb 19 09:48 Gemfile.lock

-rw-rw-r--. 1 wiki wiki 1246 Feb 19 09:47 index.html.haml

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 javascripts

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 _layouts

-rw-rw-r--. 1 wiki wiki 5512 Feb 19 09:47 Rakefile

drwxrwxr-x. 3 wiki wiki 4096 Feb 19 09:47 _site

drwxrwxr-x. 2 wiki wiki 4096 Feb 19 09:47 stylesheets

[wiki@vdanilchenko-fedora docs]$ rake

/usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `require': cannot load such file -- asciidoctor (LoadError)

       from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/tilt-2.0.0/lib/tilt/asciidoc.rb:2:in `<top (required)>'

 

Note that if I simply “require ‘asciidoctor’” in a .rb file, it works just fine…

 

 

 

 

 

From: Jason Porter [[hidden email]]
Sent: Wednesday, February 19, 2014 1:29 PM
To: [hidden email]
Subject: Re: [awestruct] A newbie question about ASCIIdoc parsing

 

Short answer, awestruct 0.4.8 doesn't have good Asciidoctor support. If you can upgrade to the current rc it should work. 


Sent from Mailbox for iPhone

 

On Wed, Feb 19, 2014 at 11:11 AM, Victor Danilchenko <[hidden email]> wrote:

Hi guys,

 

I am trying to build an Awestruct site (using awestruct 0.4.8 for reasons beyond my control), and it’s very slow going because I am not familiar with any technologies involved, though I have a solid Unix and web programming background.

 

Anyway, so after much hemming and hawing, I got Awestruct to run on my CentOS VM, and got is to compile .adoc files. However, any number of things simply don’t work. TOC doesn’t get generates (if works fine when I compile on command line using asciidoctor), image inclusion throws an error, external component inclusion is simply ignored, etc.

 

Here’s my site.yaml:

 

name: VP_Doc

title: Vistaprint Documentation Project

org: Vistaprint

author: Victor Danilchenko

 

asciidoc:

  engine: asciidoctor

 

 

And here’s my sample .adoc file:

 

---

layout: default

---

:stylesdir: .

:stylesheet: asciidoctor/styles.css

:toc: right

:toc-title: Sections

:imagesdir: images

 

== Sample header

 

blah blah

 

include::toc.adoc[]

 

== Another header

 

There's an image here

 

[[img-overview]]

.Overview of deployments

image::Overview.png[Overview, 500, 327]

 

 

But the ASCIIDoc directives at the top get ignored, the toc.adoc is presented as a simple link instead of transclusion (as ‘<a href="toc.adoc">toc.adoc</a>’), and the image:: directive throws a critical error, so I can only run awestruct –d when I comment the image:: line out.

 

All of this works when I run asciidoctor on command line – it outputs the correct .html file.

 

I have a feeling that I am missing something very simple and obvious, but I am a newbie, and have no idea what that is…

 

Can anyone help please?

 

P.S. Also, is there a way to specify the default global layout for all .adoc files, so that I don’t have to prepend front matter to them? I tried putting it into the site.yaml under ‘asciidoc’ section, but that didn’t work.

 

Thanks in advance!

 

 



 

--

 



 

--



 

--

Reply | Threaded
Open this post in threaded view
|

Re: A newbie question about ASCIIdoc parsing

mojavelinux
I'm not sure where this thread ended up, but I want to clarify the setup for anyone who comes across it.

You should not have to require 'asciidoctor' anywhere in your Awestruct configuration. The reason the include is not working is because you need to set the safe mode in Asciidoctor to unsafe (or safe).

Here are the steps to get running after generating an Awestruct site:

1. Enable the Asciidoctor gem in the Gemfile

[source,ruby]
----
gem 'awestruct', '0.5.5' 
gem 'rake', '>= 0.9.2'
gem 'asciidoctor', '1.5.1'
----

2. Configure Asciidoctor in _config/site.yml

[source,yaml]
----
...
asciidoctor:
  :safe: unsafe
  :attributes:
    imagesdir: /images
----

3. Create one or more AsciiDoc files

[source,asciidoc]
----
= About
Dan Allen
:page-layout: base

== Content

include::_includes/more.adoc[]

== Images

image::octocat.png[Octocat]
----

NOTE: The leading underscore (_) in name of the includes directory prevents it from being generated (only included).

You shouldn't need to set properties like stylesdir or stylesheet in the AsciiDoc file because those should be controlled site-wide (building on the Asciidoctor configuration above).

Cheers,

Reply | Threaded
Open this post in threaded view
|

Re: A newbie question about ASCIIdoc parsing

mojavelinux

On Wed, Sep 24, 2014 at 3:01 PM, Dan Allen <[hidden email]> wrote:
I'm not sure where this thread ended up, but I want to clarify the setup for anyone who comes across it.

You should not have to require 'asciidoctor' anywhere in your Awestruct configuration. The reason the include is not working is because you need to set the safe mode in Asciidoctor to unsafe (or safe).

Here are the steps to get running after generating an Awestruct site:

1. Enable the Asciidoctor gem in the Gemfile

[source,ruby]
----
gem 'awestruct', '0.5.5' 
gem 'rake', '>= 0.9.2'
gem 'asciidoctor', '1.5.1'
----

2. Configure Asciidoctor in _config/site.yml

[source,yaml]
----
...
asciidoctor:
  :safe: unsafe
  :attributes:
    imagesdir: /images
----

3. Create one or more AsciiDoc files

[source,asciidoc]
----
= About
Dan Allen
:page-layout: base

== Content

include::_includes/more.adoc[]

== Images

image::octocat.png[Octocat]
----

NOTE: The leading underscore (_) in name of the includes directory prevents it from being generated (only included).

You shouldn't need to set properties like stylesdir or stylesheet in the AsciiDoc file because those should be controlled site-wide (building on the Asciidoctor configuration above).

Cheers,




--