Cannot install prawn-gmagick

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot install prawn-gmagick

Conrad
Hi,

I wanted to install prawn-gmagick for asciidoctor but the commands mentioned at Git do not work.

Some people had the same problem and they installed graphicsmagick instead (gem install graphicsmagick). The installation worked, by I get the same interlaced issues as before with the recommendation to install prawn-gmagick.

Could somebody tell me what to install and how to get rid of the issue.

Many thanks in advance, C.
Reply | Threaded
Open this post in threaded view
|

Re: Cannot install prawn-gmagick

abelsromero
I suspect this is a continuation of another thread. If so, can you at least share the environment (OS, Ruby version) in which you are working and maybe add an example, or just link the other thread.
Reply | Threaded
Open this post in threaded view
|

Re: Cannot install prawn-gmagick

Conrad
abelsromero wrote
I suspect this is a continuation of another thread. If so, can you at least share the environment (OS, Ruby version) in which you are working and maybe add an example, or just link the other thread.
Yes. As I said it was a thread at GitHub. It stopped by giving this recommendation.

I rund AsciiDoctor, AsciiDoctorJ and AsciiDocFX on Windows OS. I installed Ruby 3 weeks ago.
Reply | Threaded
Open this post in threaded view
|

Re: Cannot install prawn-gmagick

abelsromero
I assume you mean this thread https://github.com/packetmonkey/prawn-gmagick/issues/9.
I just added a note sumarizing the process I followed on Windows 10.

Thing is some Ruby gems use what is called "native" components. In other words, C written code that needs to be compiled to the platform it runs (Windows, Linux, ...). On Linux this is easy since it comes with C/C++ compilation tools out-of-the-box, for Windows you need to install Mys2.
The step by step guide is as follows:
- Run `risk install`: this will install Msys2 (C compiler). If the command is not found in path, it is localted where you installed Ruby, just run form the directory. In the past I noticed sometimes the console sometimes hangs, if nothing appears for one minute or so, press enter to force a refresh.
- Install the required dev dependencies `mingw64/mingw-w64-x86_64-graphicsmagick` using the command `ridk.cmd exec pacman -S mingw64/mingw-w64-x86_64-graphicsmagick`. This is not the binary distribution, but the extra files required to compile prawn-gmagic native components. This will ask to install extra packages, say yes (Y).
- After that, just install the gem normally `gem install prawn-gmagick`. You will see in the console the message "Building native extensions. This could take a while..." and after that the normal installation messages.
If this does not work run "risk enable" first to setup the console (don't close the terminal). This step deppends on how you install MYS2, for me is not necessary.

I can imagine this seems like a big hustle, I hope this does not deter you with Asciidoctor. Having to compile native components is not common and Windows makes things a lot more complicated than other environments. If you can provide an example on some GitHub repo of what you want to achieve, it will be much easier for me or others to understand the issues and help you.

* Alternatively, you could try using WSDL or WSDL2 in Windows10, which will make building native components much easier.
Reply | Threaded
Open this post in threaded view
|

Re: Cannot install prawn-gmagick

mojavelinux
Administrator
Thanks for sharing that breakdown, Abel!

I want to point out that prawn-gmagick is not required. It's an optimization to accelerate conversion. If it's too much trouble to install, I strongly recommend not trying to install it, or using the Docker image instead (https://github.com/asciidoctor/docker-asciidoctor).

Cheers,

-Dan

On Thu, Feb 13, 2020 at 1:21 PM abelsromero [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I assume you mean this thread https://github.com/packetmonkey/prawn-gmagick/issues/9.
I just added a note sumarizing the process I followed on Windows 10.

Thing is some Ruby gems use what is called "native" components. In other words, C written code that needs to be compiled to the platform it runs (Windows, Linux, ...). On Linux this is easy since it comes with C/C++ compilation tools out-of-the-box, for Windows you need to install Mys2.
The step by step guide is as follows:
- Run `risk install`: this will install Msys2 (C compiler). If the command is not found in path, it is localted where you installed Ruby, just run form the directory. In the past I noticed sometimes the console sometimes hangs, if nothing appears for one minute or so, press enter to force a refresh.
- Install the required dev dependencies `mingw64/mingw-w64-x86_64-graphicsmagick` using the command `ridk.cmd exec pacman -S mingw64/mingw-w64-x86_64-graphicsmagick`. This is not the binary distribution, but the extra files required to compile prawn-gmagic native components. This will ask to install extra packages, say yes (Y).
- After that, just install the gem normally `gem install prawn-gmagick`. You will see in the console the message "Building native extensions. This could take a while..." and after that the normal installation messages.
If this does not work run "risk enable" first to setup the console (don't close the terminal). This step deppends on how you install MYS2, for me is not necessary.

I can imagine this seems like a big hustle, I hope this does not deter you with Asciidoctor. Having to compile native components is not common and Windows makes things a lot more complicated than other environments. If you can provide an example on some GitHub repo of what you want to achieve, it will be much easier for me or others to understand the issues and help you.

* Alternatively, you could try using WSDL or WSDL2 in Windows10, which will make building native components much easier.


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Cannot-install-prawn-gmagick-tp7637p7643.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux