We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello
On my production server, the most current pandoc version is not the one in the standard path $ pandoc, but in $ /home/www-data/.local/bin/pandoc.
$ pandoc
$ /home/www-data/.local/bin/pandoc
I managed to set PandocRuby to look at the correct place by setting it like so:
PandocRuby
PandocRuby.pandoc_path = '/home/www-data/.local/bin/pandoc'
As I need to do some other stuff in my Rails app using Pandoc, I hoped that I could simply do something like this:
def pandoc_version matches = `#{PandocRuby.pandoc_path} -v`.match /\bpandoc ((\.?\d+)+)\b/ pandoc_version = matches[1].to_f end
But this results in:
undefined method `pandoc_path' for PandocRuby:Class
I managed to work around this now using a global variable:
PANDOC_PATH = '/home/www-data/.local/bin/pandoc' PandocRuby.pandoc_path = PANDOC_PATH
So I can do:
def pandoc_version matches = `#{PANDOC_PATH} -v`.match /\bpandoc ((\.?\d+)+)\b/ pandoc_version = matches[1].to_f end
But I'm pretty sure there's an easier way to do this, right?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello
On my production server, the most current pandoc version is not the one in the standard path
$ pandoc
, but in$ /home/www-data/.local/bin/pandoc
.I managed to set
PandocRuby
to look at the correct place by setting it like so:As I need to do some other stuff in my Rails app using Pandoc, I hoped that I could simply do something like this:
But this results in:
I managed to work around this now using a global variable:
So I can do:
But I'm pretty sure there's an easier way to do this, right?
The text was updated successfully, but these errors were encountered: