New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Mac OS 10.9 Mavericks #45

Closed
deberle opened this Issue Oct 16, 2013 · 16 comments

Comments

Projects
None yet
@deberle

deberle commented Oct 16, 2013

I tried to run wkpdf on Mac OS 10.9.
I got the following result:

$ wkpdf --source http://www.apple.com --output apple.pdf
Cannot load RubyCocoa library
wkpdf requires that RubyCocoa is installed, which is shipped by default since
Mac OS X 10.5. If you use Mac OS X 10.4, you have to install RubyCocoa
yourself from http://rubycocoa.sourceforge.net/HomePage

It is obviously a problem with RubyCocoa, but I couldn't investigate further.

@plessl

This comment has been minimized.

Show comment
Hide comment
@plessl

plessl Oct 17, 2013

Owner

Thanks for the report. I don't have Mavericks installed. But I will investigate this issue, once Mavericks has been publicly released. Probably the way for accessing Cocoa frameworks has changed from 10.8.

Owner

plessl commented Oct 17, 2013

Thanks for the report. I don't have Mavericks installed. But I will investigate this issue, once Mavericks has been publicly released. Probably the way for accessing Cocoa frameworks has changed from 10.8.

@macmartine

This comment has been minimized.

Show comment
Hide comment
@macmartine

macmartine Oct 24, 2013

Same issue here. Actually, I can't seem to find RubyCocoa anywhere on my system.

And when I try to install the latest version I'm told "RubyCocoa-1.0.5-OSX10.8 can't be installed on this disk."

Sounds reasonable since I'm no longer on 10.8.

So, not sure it has much to do with wkpdf....

macmartine commented Oct 24, 2013

Same issue here. Actually, I can't seem to find RubyCocoa anywhere on my system.

And when I try to install the latest version I'm told "RubyCocoa-1.0.5-OSX10.8 can't be installed on this disk."

Sounds reasonable since I'm no longer on 10.8.

So, not sure it has much to do with wkpdf....

@plessl

This comment has been minimized.

Show comment
Hide comment
@plessl

plessl Oct 29, 2013

Owner

I have now installed 10.9 and can reproduce the problem. I had a first look at the issue.

It seems that OS X 10.9 no longer ships with rubycocoa pre-installed. Further, rubycocoa is not yet compatible with ruby 2.0, which is the default ruby in OS X 10.9. Finally, rubycocoa cannot be installed using gem, but requires a dedicated installer.

These changes make it very difficult to provide a simple way of installing wkpdf on OS X 10.9.

I think the current options are:

  1. Use ruby version 1.8, which is still available in 10.9.

  2. Wait until rubycocoa is compatible with ruby 2.0

  3. Throw out the baby with the bathwater and convert wkpdf to Objective-C again (this is where I started, initially)

I'm not too excited about all of these options.

Any advise or support would be greatly appreciated.

Owner

plessl commented Oct 29, 2013

I have now installed 10.9 and can reproduce the problem. I had a first look at the issue.

It seems that OS X 10.9 no longer ships with rubycocoa pre-installed. Further, rubycocoa is not yet compatible with ruby 2.0, which is the default ruby in OS X 10.9. Finally, rubycocoa cannot be installed using gem, but requires a dedicated installer.

These changes make it very difficult to provide a simple way of installing wkpdf on OS X 10.9.

I think the current options are:

  1. Use ruby version 1.8, which is still available in 10.9.

  2. Wait until rubycocoa is compatible with ruby 2.0

  3. Throw out the baby with the bathwater and convert wkpdf to Objective-C again (this is where I started, initially)

I'm not too excited about all of these options.

Any advise or support would be greatly appreciated.

@FreddieLindsey

This comment has been minimized.

Show comment
Hide comment
@FreddieLindsey

FreddieLindsey Nov 3, 2013

I'm really excited to use this for automating HTML to PDF with Hazel on my Mac, so for longevity, the latter would be amazing. For now though, I'm trying to use the 1st option with my Mac and see how I get on.

FreddieLindsey commented Nov 3, 2013

I'm really excited to use this for automating HTML to PDF with Hazel on my Mac, so for longevity, the latter would be amazing. For now though, I'm trying to use the 1st option with my Mac and see how I get on.

@nodje

This comment has been minimized.

Show comment
Hide comment
@nodje

nodje Nov 29, 2013

Same problem here. I've tried to install latest RubyCocoa for 10.9 (https://sourceforge.net/projects/rubycocoa/files/RubyCocoa/1.1.0/) to no avail.

Tried also to make with a OS X user still having Ruby 1.8.7 but same problem...

nodje commented Nov 29, 2013

Same problem here. I've tried to install latest RubyCocoa for 10.9 (https://sourceforge.net/projects/rubycocoa/files/RubyCocoa/1.1.0/) to no avail.

Tried also to make with a OS X user still having Ruby 1.8.7 but same problem...

@mikew

This comment has been minimized.

Show comment
Hide comment
@mikew

mikew Dec 14, 2013

  1. Install RubyCocoa
  2. sudo /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem install wkpdf
  3. Edit the first line of /Library/Ruby/Gems/1.8/gems/wkpdf-0.6.11-universal-darwin/bin/wkpdf to point to /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  4. Use /Library/Ruby/Gems/1.8/gems/wkpdf-0.6.11-universal-darwin/bin/wkpdf

mikew commented Dec 14, 2013

  1. Install RubyCocoa
  2. sudo /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem install wkpdf
  3. Edit the first line of /Library/Ruby/Gems/1.8/gems/wkpdf-0.6.11-universal-darwin/bin/wkpdf to point to /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  4. Use /Library/Ruby/Gems/1.8/gems/wkpdf-0.6.11-universal-darwin/bin/wkpdf
@maciej-gurban

This comment has been minimized.

Show comment
Hide comment
@maciej-gurban

maciej-gurban Jan 23, 2014

Hi @mikew, could you specify how exactly should the edited line look like? My first line is
#!/usr/bin/ruby
So I assume you mean the second one, which is:
$LOAD_PATH.unshift File.join(File.dirname(FILE), '..', 'lib')

Is that what's supposed to be edited?

maciej-gurban commented Jan 23, 2014

Hi @mikew, could you specify how exactly should the edited line look like? My first line is
#!/usr/bin/ruby
So I assume you mean the second one, which is:
$LOAD_PATH.unshift File.join(File.dirname(FILE), '..', 'lib')

Is that what's supposed to be edited?

@mikew

This comment has been minimized.

Show comment
Hide comment
@mikew

mikew Jan 23, 2014

No, the very first line.

before: #!/usr/bin/ruby
after: #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

mikew commented Jan 23, 2014

No, the very first line.

before: #!/usr/bin/ruby
after: #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

@Xucam

This comment has been minimized.

Show comment
Hide comment
@Xucam

Xucam Feb 21, 2014

Thanks @mikew, I was stumped with the same problem and your solution worked perfectly for me.
OS X 10.9.1 on Macbook Air (mid 2012)

Xucam commented Feb 21, 2014

Thanks @mikew, I was stumped with the same problem and your solution worked perfectly for me.
OS X 10.9.1 on Macbook Air (mid 2012)

@chris-mcdonald

This comment has been minimized.

Show comment
Hide comment
@chris-mcdonald

chris-mcdonald Mar 3, 2014

A simple solution to get this to work on Mavericks, for me, was:

(as root):
$ umask 022
$ cd /System/Library/Frameworks/Ruby.framework/Versions
$ rm -f Current
$ ln -s 1.8 Currrent

then, as me again, just install wkpdf as normal.

chris-mcdonald commented Mar 3, 2014

A simple solution to get this to work on Mavericks, for me, was:

(as root):
$ umask 022
$ cd /System/Library/Frameworks/Ruby.framework/Versions
$ rm -f Current
$ ln -s 1.8 Currrent

then, as me again, just install wkpdf as normal.

@prenagha

This comment has been minimized.

Show comment
Hide comment
@prenagha

prenagha Mar 5, 2014

Thanks @chris-mcdonald
That worked great for me on Mavericks

prenagha commented Mar 5, 2014

Thanks @chris-mcdonald
That worked great for me on Mavericks

@JerryLead

This comment has been minimized.

Show comment
Hide comment
@JerryLead

JerryLead Aug 21, 2014

Although ruby-1.8 still exists in Mavericks, it cannot work now on my laptop. As a result, I have to use ruby 2.0.0. However, after I installed wkpdf by gem 2.0.14, I encounter the following error:

$ wkpdf --source http://www.apple.com --output apple.pdf
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rdoc/usage (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/wkpdf-0.6.11-universal-darwin/lib/commandline_parser.rb:1:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/wkpdf-0.6.11-universal-darwin/lib/wkpdf.rb:14:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/wkpdf-0.6.11-universal-darwin/bin/wkpdf:4:in `<top (required)>'
    from /usr/bin/wkpdf:23:in `load'
    from /usr/bin/wkpdf:23:in `<main>'

I updated the rdoc (now it is 4.1.1), but the error still occurs.

JerryLead commented Aug 21, 2014

Although ruby-1.8 still exists in Mavericks, it cannot work now on my laptop. As a result, I have to use ruby 2.0.0. However, after I installed wkpdf by gem 2.0.14, I encounter the following error:

$ wkpdf --source http://www.apple.com --output apple.pdf
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rdoc/usage (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/wkpdf-0.6.11-universal-darwin/lib/commandline_parser.rb:1:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/wkpdf-0.6.11-universal-darwin/lib/wkpdf.rb:14:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/wkpdf-0.6.11-universal-darwin/bin/wkpdf:4:in `<top (required)>'
    from /usr/bin/wkpdf:23:in `load'
    from /usr/bin/wkpdf:23:in `<main>'

I updated the rdoc (now it is 4.1.1), but the error still occurs.

@plessl

This comment has been minimized.

Show comment
Hide comment
@plessl

plessl Aug 21, 2014

Owner

@JerryLead Sorry, I have no idea what is causing the error. Unfortunately, wkpdf could never be ported to work flawlessly with a default OS X 10.9 installation, without resorting to hacks. Since Apple has effectively abandoned RubyCocoa, I feel that relying on RubyCocoa is a dead end, which is why I have stopped the development of wkpdf.

For the future, I'm considering resurrecting the Objective-C version of wkpdf or port the tool to Swift.

If anybody is interested in supporting this effort, please get in touch with me.

Owner

plessl commented Aug 21, 2014

@JerryLead Sorry, I have no idea what is causing the error. Unfortunately, wkpdf could never be ported to work flawlessly with a default OS X 10.9 installation, without resorting to hacks. Since Apple has effectively abandoned RubyCocoa, I feel that relying on RubyCocoa is a dead end, which is why I have stopped the development of wkpdf.

For the future, I'm considering resurrecting the Objective-C version of wkpdf or port the tool to Swift.

If anybody is interested in supporting this effort, please get in touch with me.

@siriusx

This comment has been minimized.

Show comment
Hide comment
@siriusx

siriusx Aug 30, 2014

mikew's steps from Dec 13, 2013 worked perfectly for me. I am on mac os 10.9.4

Install RubyCocoa sudo
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem install
wkpdf Edit the first line of
/Library/Ruby/Gems/1.8/gems/wkpdf-0.6.11-universal-darwin/bin/wkpdf to point
to /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby Use
/Library/Ruby/Gems/1.8/gems/wkpdf-0.6.11-universal-darwin/bin/wkpdf

siriusx commented Aug 30, 2014

mikew's steps from Dec 13, 2013 worked perfectly for me. I am on mac os 10.9.4

Install RubyCocoa sudo
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem install
wkpdf Edit the first line of
/Library/Ruby/Gems/1.8/gems/wkpdf-0.6.11-universal-darwin/bin/wkpdf to point
to /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby Use
/Library/Ruby/Gems/1.8/gems/wkpdf-0.6.11-universal-darwin/bin/wkpdf

@nevali

This comment has been minimized.

Show comment
Hide comment
@nevali

nevali Oct 31, 2014

The error above (@JerryLead’s) is nothing in particular to do with RubyCocoa, it's because wkpdf uses rdoc/usage which doesn't exist in Ruby 1.9 and 2.0. Unfortunately, I don't know enough Ruby to fix it quickly.

(RubyCocoa remains actively maintained, just not distributed by Apple any more—packages for 10.9 [both Ruby 1.8 and 2.0] and 10.10 [Ruby 2.0 only]) are available from the SourceForge project page.

nevali commented Oct 31, 2014

The error above (@JerryLead’s) is nothing in particular to do with RubyCocoa, it's because wkpdf uses rdoc/usage which doesn't exist in Ruby 1.9 and 2.0. Unfortunately, I don't know enough Ruby to fix it quickly.

(RubyCocoa remains actively maintained, just not distributed by Apple any more—packages for 10.9 [both Ruby 1.8 and 2.0] and 10.10 [Ruby 2.0 only]) are available from the SourceForge project page.

@plessl

This comment has been minimized.

Show comment
Hide comment
@plessl

plessl Dec 11, 2014

Owner

I appreciate your interest in wkpdf.

Unfortunately I have to inform you that changes in OS X made it difficult for me to provide the installation and usage experience, which I envisioned for wkpdf. Hence, I have stopped the development of the rubygems version of wkpdf in December 2014.

More details on the reasons and some words on how you could contribute to a reincarnation of wkpdf can be found here:

http://plessl.github.io/wkpdf/

Cheers,
Christian

Owner

plessl commented Dec 11, 2014

I appreciate your interest in wkpdf.

Unfortunately I have to inform you that changes in OS X made it difficult for me to provide the installation and usage experience, which I envisioned for wkpdf. Hence, I have stopped the development of the rubygems version of wkpdf in December 2014.

More details on the reasons and some words on how you could contribute to a reincarnation of wkpdf can be found here:

http://plessl.github.io/wkpdf/

Cheers,
Christian

@plessl plessl closed this Dec 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment