Skip to content
This repository has been archived by the owner on Mar 20, 2018. It is now read-only.

Unable to build static site #38

Open
arnoldtonderaimarunda opened this issue Dec 30, 2017 · 2 comments
Open

Unable to build static site #38

arnoldtonderaimarunda opened this issue Dec 30, 2017 · 2 comments

Comments

@arnoldtonderaimarunda
Copy link

arnoldtonderaimarunda commented Dec 30, 2017

Tried to run bin/flutterby build and obtained the following error. A partially filled folder _Build has been created. The localhost run bin/flutterby serve works well.

🦋 Flutterby 0.6.2
📚 Importing site...
🌲 Read 45 nodes.
💾 Exporting site...
• Exported /css/styles.css
• Exported /files/year5.html
• Exported /img/247booking.png
• Exported /index.html
• Exported /js/app.js
• Exported /year10/Arts/arts_lesson_1.html
• Exported /year10/Arts/arts_lesson_2.html
• Exported /year10/Exegesis/exegesis_lesson_1.html
• Exported /year10/Exegesis/exegesis_lesson_2.html
• Exported /year10/lessons.html
/usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/node.rb:354:in block in render': undefined method html_safe' for nil:NilClass (NoMethodError)
Did you mean? html_safe?
from /usr/local/Cellar/ruby/2.4.3_1/lib/ruby/2.4.0/benchmark.rb:308:in realtime' from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/node.rb:352:in render'
from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:19:in export_node' from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:24:in block in export_node'
from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:23:in each' from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:23:in export_node'
from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:24:in block in export_node' from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:23:in each'
from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:23:in export_node' from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/exporter.rb:8:in export!'
from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/cli.rb:47:in block in build' from /usr/local/Cellar/ruby/2.4.3_1/lib/ruby/2.4.0/benchmark.rb:308:in realtime'
from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/lib/flutterby/cli.rb:38:in build' from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in start' from /usr/local/lib/ruby/gems/2.4.0/gems/flutterby-0.6.2/exe/flutterby:10:in <top (required)>'
from bin/flutterby:17:in load' from bin/flutterby:17:in

'

@arnoldtonderaimarunda
Copy link
Author

Note, removing the html_safe from node.rb method allows the process to complete successfully.

@arnoldtonderaimarunda
Copy link
Author

arnoldtonderaimarunda commented Dec 30, 2017

Whilst, it successfully created a static build I noted a failure to render correctly the hyperlinks in .html.slim documents to other .html.slim documents.

For example;
li = link_to "Year 5", "/year5/lessons", class: "button"

is rendered in the _build directory as
<li><a class="button" href="/year5/lessons">Year 5</a></li>

instead of
<li><a class="button" href="/year5/lessons.html">Year 5</a></li>

Thanks

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

No branches or pull requests

1 participant