How to install on MacOS 10.10 Yosemite

elzr edited this page Oct 29, 2014 · 1 revision

Starting with MacOS 10.10 Yosemite RubyCocoa is no longer bundled.

To get wkpdf working on Yosemite, do this on your terminal:

  1. Install Ruby 1.8.7 through RVM with specific options:
    rvm install 1.8.7-head --debug --reconfigure -C --enable-shared=yes

  2. Start using the newly installed ruby: rvm use 1.8.7

  3. Install wkpdf gem install wkpdf and edit its bin nano /usr/bin/wkpdf so that in the first #! line it uses your newly installed ruby (do a which ruby and it should be something like ~/.rvm/rubies/ruby-1.8.7-head/bin/ruby) and not system ruby (which as of Yosemite is Ruby 2.0, which isn't compatible with RubyCocoa).

  4. Download the latest RubyCocoa version:
    wget http://sourceforge.net/projects/rubycocoa/files/RubyCocoa/1.2.0/RubyCocoa-1.2.0.tar.gz/download RubyCocoa-1.2.0.tar.gz -O RubyCocoa-1.2.0.tar.gz

  5. Uncompress into a folder and move into it: tar xzf RubyCocoa-1.2.0.tar.gz && rm RubyCocoa-1.2.0.tar.gz && cd RubyCocoa-1.2.0

  6. Config the RubyCocoa installation: ruby install.rb config --target-archs="x86_64" (see this gist)

  7. Setup & run the RubyCocoa installation:
    ruby install.rb setup
    sudo ruby install.rb install

  8. That's it, run wkpdf's help to test it works: wkpdf --help

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.