我尝试在我的rails应用程序中使用asciidoctor。我将它添加到我的Gemfile中,并制作了bundle install。
现在,我尝试在Controller中使用asciidoctor:
def show
@article.text = Asciidoctor.render(@article.text)
end但我发现了一个错误:
uninitialized constant ArticlesController::Asciidoctor怎样才能正确地使用rails来使用asciidoctor-gem?
发布于 2014-06-17 20:49:52
请记住在更改Rails之外的自动重新加载路径(即app/*和config/routes.rb)后重新启动服务器。
因为文档看起来与您的示例非常相似
puts Asciidoctor.render '*This* is http://asciidoc.org[AsciiDoc]!'我猜,您只是忘了重新启动服务器。
https://stackoverflow.com/questions/24272873
复制相似问题