Install Prawn gem in SketchUp 2016

I am still seriously considering using Prawn to do some PDF work. If it is not too much trouble I would be interested in the single .rb file that can eliminate the headaches of wrapping all of the Prawn files etc…

Might be that other can provide improvements back in return. Considering how different some gems are - some modifying the Ruby API itself - I’m guessing that there are some gem cases that might pose problems.

(This is my shameless attempt to promote more open source collaboration.)

1 Like

prawn_source_and_combined.zip (268.7 KB)
Here you have an archive containing the current sources as downloaded from github today, and a single .rb containing a combination of all sources. I have also included the licenses of each of the sources (Prawn, TTfunk and PdfCore) in the archive.
Please notice this currently doesn’t load into Sketchup. It looks like the current version of prawn is not compatible with SU2018`s ruby version.
Download and use at your own risk.

2 Likes

https://github.com/kengey/sketchup-dev-tools-and-examples/tree/master/tools/ruby-packer

4 Likes

This is pretty cool.

As far as wrapping it, I’m assuming I only need to make “one” wrap since it is neatly packaged into a single file.

The latest version of Prawn shows that it only needs Ruby 2.0.0 to work so it should work with SU 2018.

The readme doc states: We officially support Ruby 2.3 and newer.
You will notice that loading the combined .rb in Sketchup fails. That is because the sources use some syntax not supported in ruby 2.2

1 Like

Prawn 2.2.x requires Ruby 2.1 or later prawn | RubyGems.org | your community gem host

Prawn 2.1.0 requires Ruby 2.0 or later prawn | RubyGems.org | your community gem host

Note that their Travis CI testing is only done on Ruby 2.3.0 and later…

I didn’t use the sources installed with the gem, but used the github sources.
Maybe I should’ve first installed the gem and then just point my RubyPacker to the installed .rb.

That should do.

1 Like