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

Updating Ruby for Paru, Pandocomatic, and Scrivomatic #22

Closed DanielWElliott closed 5 years ago

DanielWElliott commented 5 years ago

In trying to update paru and pandocomatic according to the instructions you provided here, I discovered that I have an outdated version of Ruby and that paru won't update because of that. Using some google-fu, I ended up finding your comment on a pandocomatic issue where you said that you would "change the advice [you] give to [users of your scrivener workflow], and suggest [we] upgrade via rbenv/homebrew..."

I haven't had any issues using Scrivomatic yet, but I'd like to find out how to update Ruby so I can update Paru, Pandocomatic, and Scrivomatic before I do run into issues.

Thanks for the work you have put into Scrivomatic!

iandol commented 5 years ago

Hi, yes indeed I'll update the instructions when I get time...

To use homebrew is easy, especially as I recommend it to install pandoc anyway, you just:

> brew install ruby

And keep it up-to-date by running this command every so often:

> brew upgrade

rbenv is slightly more involved, and for 95% of users is unnecessary. It allows you to run different versions of ruby side-by-side, and easily switch between them. You use brew to install rbenv, then use rbenv to install ruby: rbenv install 2.6.2, and then you can switch to that version using rbenv global 2.6.2 or back to the system ruby with rbenv global system. I use rbenv as I need to test my scripts under different versions of ruby...

iandol commented 5 years ago

Actually I see that homebrew ruby is not added to the path, and that you may have to manually add /usr/local/lib/ruby/gems/bin to the path if you want to use pandocomatic. I don't have time at the moment to double check this. I know rbenv method does work, so perhaps suggest this unitl I can see how the brew version could be used...

iandol commented 5 years ago

Here are draft instructions: https://github.com/iandol/scrivomatic/blob/master/Installing-Ruby.md

DanielWElliott commented 5 years ago

I had meant to reply and update you that I managed to install a newer version of Ruby using your instructions in 88dee2c, though I had to add eval "rbenv init -" to my .bash_profile as directed by rbenv. I see you added that step in f087558, though I'm not sure if .bash_profile vs .bashrc makes a difference for Terminal.app since it runs .bash_profile when it starts.

Thank you for helping the Scrivener community!

iandol commented 5 years ago

@DanielWElliott – oh right, I haven't actually used bash for ages, and I had previously edited my .bash_profile to source .bashrc — but I've edited the instructions to use .bash_profile as this is what is used by interactive shell sessions in macOS according to a search, thanks for the pointer!