iandol / scrivomatic

A writing workflow using Scrivener's style system + Pandoc for output…
https://iandol.github.io/scrivomatic/
GNU General Public License v3.0
296 stars 31 forks source link

Incorrect version of Ruby Called? #23

Closed edglazer closed 5 years ago

edglazer commented 5 years ago

My log output is stating that it's using system Ruby, though I installed latest version using rbenv. Hard to tell if scrivomatic is actually using the system Ruby, or just a reference to it in the log output, because it appears to complete just fine, which shouldn't be the case using 2.3.7, right?

Here's the output:

=== ------------------------------------------------------ ===
=== Scrivomatic V1.0.25 Report @ 2019-04-02 19:06:24 -0700 ===
=== ------------------------------------------------------ ===
 Running under Ruby 2.3.7
 Working directory: /Users/XXXXXXXXX/Library/Mobile Documents/com~apple~CloudDocs/FOLDERNAME
===------ Input Options: ------===
#<struct Scrivomatic::OPT input="DOCUMENT.md", output=nil, to=nil, yaml=nil, command="pandocomatic", envpath="/Users/XXXXXXXXX/bin:/Users/XXXXXXXXX/.rbenv/shims:/usr/local/bin", build=false, cleanup=false, verbose=true, dry_run=false, open_log=true, data_dir=nil>
===------ Final ENV PATH: ------===
/Users/XXXXXXXXX/bin:/Users/XXXXXXXXX/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/Scrivener.app/Contents/Resources/MultiMarkdown/bin
===------ TOOL PATHS: ------===
---pandoc: /usr/local/bin/pandoc | V: 2.7.1
---pandocomatic: /Users/XXXXXXXXX/.rbenv/shims/pandocomatic | V: Pandocomatic version 0.2.4.0
---ruby: /Users/XXXXXXXXX/.rbenv/shims/ruby | V: ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin17]
---rbenv: /usr/local/bin/rbenv
---python: /usr/local/bin/python

 … running pandocomatic, please wait …
===------ COMMAND OUTPUT: ------===
:: Running: /Users/XXXXXXXXX/.rbenv/shims/pandocomatic --debug DOCUMENT.md 
::: pandoc  
::: Pandocomatic needed 0.1 seconds to convert 'DOCUMENT.md'.
:: exit status: pid 1107 exit 0

This is on 10.13.6. iTerm is my main terminal, and just to make it a little more difficult, I'm using Fish for my system shell.

Thanks for all the work on Scrivomatic, this is really great!

iandol commented 5 years ago

Hi, when you run scrivomatic, the shell environment that Scrivener creates does not have rbenv activated, so scrivomatic runs under the system Ruby. BUT, scrivomatic then adds the correct paths as necessary, so note under TOOL PATHS that scrivomatic can now call the latest Ruby:

---ruby: /Users/XXXXXXXXX/.rbenv/shims/ruby | V: ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin17]

This is the version that pandocomatic will run under, so no problems for it to do its job :-)

madeinoz67 commented 5 years ago

I found installing RVM helped with my path issues tremendously https://rvm.io/rvm/install

edglazer commented 5 years ago

Cool, thanks for the clarification @iandol !! and thanks for the suggestion @madeinoz67 - I'll take a look!

iandol commented 5 years ago

I switched from RVM to rbenv, as rbenv is more minimalist, but both should work well with scrivomatic...