pandoc-ruby | Ruby wrapper for Pandoc
kandi X-RAY | pandoc-ruby Summary
kandi X-RAY | pandoc-ruby Summary
Ruby wrapper for Pandoc
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pandoc-ruby
pandoc-ruby Key Features
pandoc-ruby Examples and Code Snippets
Community Discussions
Trending Discussions on pandoc-ruby
QUESTION
I have a ruby on rails app that uses pandoc-ruby to convert markdown files into pdf.
The pandoc-ruby requires pandoc installation. To successfully convert to pdf, pdflatex needs to be present as well. Locally (tested on Mac and Ubuntu 18.04) everything is working if pandoc
, texlive-latex-recommended
and texlive-fonts-recommended
packages are installed. Things get a little bit tricky when deploying to heroku.
To install all the packages on heroku I've used the Aptfile approach and I have not been able to solve this.
Approach 1: Aptfile
I've specified this Aptfile:
...ANSWER
Answered 2021-Jan-25 at 19:29After quite a bit of trial and error, I have found a solution that works.
As @mb21 mentioned, Docker image would probably be the best option long term. Docker images are supported on Heroku. However, I wanted to avoid dockerizing the whole application to solve this issue.
After finding a TeX Live buildpack for Heroku that supports adding custom TeX Live packages (one example of such buildpack), the error on conversion was ! LaTeX Error: File 'xcolor.sty' not found.
I used tlmgr
to get some info on the missing file. Running tlmgr search --global --file xcolor.sty
does the trick and reveals that there is a package called xcolor
. After installing that we come to the next error, and the next, and the next. In the end I ended up installing 2 collections that are small enough for Heroku (mind the 500MB slug size limit) and contain everything pandoc needs for a successful conversion. Those 2 are collection-fontsrecommended
and collection-latexrecommended
.
Adding a texlive.packages
file to the root of the application does the trick. It is recognized by the buildpack and it installs all the specified packages for you using tlmgr
.
QUESTION
I postes this question because I didn't find any related answer on stackoverflow. I did everything. I will explain what I have tried.
When I start the Rails server using rails s
, I get the following output:
ANSWER
Answered 2019-Jul-03 at 12:33The root of the problem seems to be bundler. What operating system and Ruby version are you using? It may be a problem with old OpenSSL library, so you can not install bundler and everything after it.
If you are using jRuby (your gem list
output tells so), your problem seems to be the same as described in link. And there is a solution as well.
Maybe you forgot to set 2.1.2
version of ruby as global? (rbenv set global 2.1.2
)
QUESTION
I am trying to use the :markdown
filter with haml-rails
on Rails 5.0.2.
When I first tried to use Markdown in a HAML file, it said it needed pandoc-ruby
as a dependency, so I added that to my Gemfile. However, now when I try to use :markdown
inside my file, I am getting the following error:
ANSWER
Answered 2018-Mar-06 at 17:55From its README:
PandocRuby is a wrapper for Pandoc, a Haskell library with command line tools for converting one markup format to another.
It requires Pandoc to be installed separately (emphasis added):
First, make sure to install Pandoc.
Next, add PandocRuby to your Gemfile
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pandoc-ruby
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page