rbenv and wkpdf #270

Closed
pdoak opened this Issue Oct 13, 2012 · 5 comments

Projects

None yet

2 participants

@pdoak
pdoak commented Oct 13, 2012

I have a clean install of mountain lion 10.8.2 and have installed rbenv and gem installed wkpdf. When I try and run wkpdf, I get the following message:

xxxx-MacBook-Pro:~ xxx$ wkpdf --help
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

Is it possible to run wkpdf in the rbenv environment?

@pdoak
pdoak commented Nov 17, 2012

I am still trying to get this working. Does anyone know how to get RubyCocoa libraries to run under a rbenv shell?

@mislav
Collaborator
mislav commented Dec 13, 2012

You need to install wkpdf using system ruby, as other rubies that you've added to rbenv aren't likely compiled with RubyCocoa support.

RBENV_VERSION=system gem install wkpdf
rbenv rehash
RBENV_VERSION=system wkpdf
@mislav mislav closed this Dec 13, 2012
@pdoak
pdoak commented Dec 13, 2012

Thank you for your help. I installed wkpdf using

RBENV_VERSION=system gem install wkpdf

which installed successfully and ran rbenv rehash but I still can't seem to be able to use it.

If I try the following command:

RBENV_VERSION= system wkpdf --help

it says bash command not found. If I try just wkpdf in terminal, I get the same error message as I showed in my original question. Do you know how to run wkdpf once it is installed using the system ruby?

Many thanks

@mislav
Collaborator
mislav commented Dec 13, 2012

Your system ruby needs sudo privileges to install stuff. Because you didn't use sudo, it probably installed it under your ~/.gem, and also put the binstub there. That's probably not in your path, so you can't access the executable by typing "wkpdf".

Try to locate it like this:

find ~/.gem -name wkpdf -type f -perm +0777

if it's there, copy it to somewhere in your PATH, e.g. your "~/bin" (if that's how you have your shell set up). Or, setup an alias to call it with the full path.

Or, uninstall it from that location and install again using sudo:

sudo env RBENV_VERSION=system gem install wkpdf

Now the executable will be in /usr/bin/wkpdf.

@pdoak
pdoak commented Dec 13, 2012

That worked. I have been wanting to get this to work for a long time.

Thank you very much.

Regards

Paul

On 13 Dec 2012, at 10:40, Mislav Marohnić notifications@github.com wrote:

Your system ruby needs sudo privileges to install stuff. Because you didn't use sudo, it probably installed it under your ~/.gem, and also put the binstub there. That's probably not in your path, so you can't access the executable by typing "wkpdf".

Try to locate it like this:

find /.gem -name wkpdf -type f -perm +0777
if it's there, copy it to somewhere in your PATH, e.g. your "
/bin" (if that's how you have your shell set up). Or, setup an alias to call it with the full path.

Or, uninstall it from that location and install again using sudo:

sudo env RBENV_VERSION=system gem install wkpdf
Now the executable will be in /usr/bin/wkpdf.


Reply to this email directly or view it on GitHub.

@enure enure referenced this issue in plessl/wkpdf Aug 2, 2013
Closed

Cannot load RubyCocoa library #36

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