Bible Study Kit in Obsidian Scripts (Help and Support)

Though I love the Bible Study Kit in Obsidian from @Joschua, I am wondering why everybody posts his help and support the release info thread.

Maybe this could be an example or a filter to reduce the forgotten questions.

I would love to help if someone has trouble running the script or ruby trouble in this thread and maybe we will even find another place to do this in the upcoming future.

4 Likes

Troubleshooting Ruby Installation Issues

Ruby - is?

Ruby is a great programming language running with an interpreter. The toolchain installation might be not so easy if you are not trained in setting up a development system.

For Windows Users I would recommend the PowerShell Tool scoop - a really great command line package installer, that is even able to manage different ruby versions on the same system.

For Mac users I still have to look for a good and stable solution. Many would suggest homebrew / brew another package manager that I am not really happy with (maybe I did something wrongā€¦all the times I tried it).

For linux you have to look for the correct package manager on you system (like pacman for Arch Linux)

Gettting the installed and active version of ruby is done with the command on the terminal / command line / powershell

 ruby --version 

IMPORTANT!
If you post something here it would be great to include your operating system (including the version like: Window 10 or Mac Os 10.42)
and the version of your ruby installation

Gems ?

Ruby has a package / extension system and a gem is a package.

After installing ruby you are able to add / remove (download and install) those gems to your lokal installation.

Installing a specific package / gem in done by the command:

gem install {{package_name}} -v {{gem-version}}

(The {{ }} are only for highlighting purpose so an example would be:

gem install asciidoctor -v 2.0.17

NOTE:
Installing a gem often installs all the necessary gems that are needed from this gem.

Hi Felix,

Thanks for creating this thread!

Iā€™m running into issues trying to download the NRSV translation via the Bible Study Kit. Iā€™m running the latest version of MacOS.

Every time I run the following in Terminal:

bash bg2obs.sh -v NRSV -beai

I get the following error in response:

bg2obs.sh: line 1: syntax error near unexpected token `newline'
bg2obs.sh: line 1: `<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'

Iā€™m positive that my files are all in the right place, and that Iā€™m in the correct directory.

Also, I installed Ruby via a guide I found online, and I updated my gems using this command:

sudo gem install colorize optparse clipboard

Iā€™m not sure where to go from here. Thanks for any help you can provide!

1 Like

that sounds really strange. Could you copy the fist three lines of slyour bash script into a message of this thread?

It sound like the script starts with an html tag (ā€™<html DTDā€¦ā€™)

the line 1 should be ā€˜#!/bin/bashā€™

I finally figured it out after trying the Script again. I wasnā€™t downloading the files correctly from GitHub. In case this helps anyone else out there, be sure to click the green ā€œcodeā€ button (top-right); then, via the dropdown, select ā€œDownload ZIP.ā€ I was copying the code manually into a TextEdit document, but I couldnā€™t save the file in the correct formal. So, now, everything works and I realize how easy is all of this to do. Thanks for looking into this for me!

Hi @Felix42ā€¦

I have one for you!
V11.6 MAC OSX
ruby 2.6.3p62 - updated with brew after brew was updated to 3.3.16-17

I downloaded ESVā€¦the first chapter is repeated for every book.
Thenā€¦have not looked exhaustively but seems like books with a number like ā€œ1 Johnā€
have the following error:
e[0;31;49mError: could not parse data from BibleGateway: please check your usage, and if still a problem, please raise an issue on GitHub.e[0m
and this is all the file contains.

Wonder if I need to update Rubyā€¦

Thanks in advance. This is a great concept from @Joschua with your supportā€¦I hope to publish my recipe when done.

Greg

FIXED: Need to use older version of .rb script 1.4.3 from jgclark/Biblegatewayā€¦on Github.
Both errors gone.

1 Like

I canā€™t seem to run the script at all.

Iā€™m in Windows 11. Followed instructions to install Ruby, with all its extra parts and pieces. (Can successfully verify from the command line that it is, in fact, installed.)

Followed instructions to install the three gems indicated by the original kit.

Downloaded and extracted the ZIPs for both scripts to the same folder. (I got the impression from the instructions that this is what I should need to do, although this could possibly be the issue because it seems to have overwritten a couple of duplicate files between the two.)

Iā€™ve made two minor edits to the files: changed the version in config.sh from ESV to NKJV, and changed LORD in bg2md.rb to YHWH, which I think (hope!) shouldnā€™t do anything but change the output of that one word.

chmod 755 bg2md.rb tells me it ā€œis not recognized as an internal or external command,
operable program or batch file.ā€ Likewise, I canā€™t run bash bg2md.rb or bash bg2obs.sh or bg2md.rb or bg2obs.sh - they all give me that same error message that itā€™s not a recognized command, operable program, or batch file.

1 Like

I have been trying to get the scripts working but I keep getting this error:

bg2md.rb:1:in `<main>': undefined local variable or method `book' for main:Object (NameError)

Any ideas on what it could be? (macOS)

On Windows 10, when I run the script, I get the following error (for every chapter of each book):

.bg2obs.sh: line 172: ruby: command not found

The final output gives me all of the folders, but none of the chapter.md files have any verses in them, just the yaml and chapter header.

hello, I would like some help, it would be very useful for me to have the cross-references between the biblical texts in my obsidian, I have the references in a tableā€¦ do you know a way to automate adding them to the lines of the verses?

Hi @felix42 - not sure if you are still responding to comments here and are still developing updated instructions. I ran into the ā€œempty markdown filesā€ problem many had reported using the catholic edition of the script. I found that I was missing a gem called ā€˜ffiā€™. Once I loaded that and ran the script, all went well. I do not recall this gem listed on the required gems list, so perhaps that should be updated in the instructions.

Thanks for any support you are providing. I can see a lot of people are passionate about this activity.

Bryndwl

I believe I solved the problem, I had the same issue. What I did was install ffi using the following code:

gem install ffi

can you tell me if that fixes the problem?

1 Like

Hey, Iā€™ve been having the same problem. I tried running that command to install the ffi gem, but Iā€™m still having the same issue. What else can be done to fix this issue?

I am running Ruby 2.7.4p191 on Chromebook. Iā€™ve tried running the scripts when I get the following error message:

bg2obs.sh: line 7: syntax error near unexpected token newline' bg2obs.sh: line 7: ā€™

Any ideas?

Trying to troubleshoot an issue I discovered when trying to split the chapters into individual verse files. I ran the scripts the way the instructions described. Checked a few folders to see if everything was working, but stopped after the first couple. Did not think to check all of them.

So, when I go to run the script to split the chapters into verse I discover all the books with number prefixes (ie, 1 Samuel, etc) have empty folders.

Has anyone else encountered this problem? Or any ideas as to why that would have happened?