Cannot install prawn-gmagick

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 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
Reply | Threaded
Open this post in threaded view
|

Re: Cannot install prawn-gmagick

Conrad
Many thanks !
Reply | Threaded
Open this post in threaded view
|

Re: Cannot install prawn-gmagick

KLynn2021
In reply to this post by abelsromero
With Dan's permission, I'm adding onto this topic rather than creating a new one...

GIF images aren't showing up in PDFs created with Asciidoctor-PDF. We're working in Windows 10 with the most recent Asciidoctor and Asciidoctor-PDF versions.

I was getting the prompt to install prawn-gmagick, but even after following Abel's instructions above, and rebooting my machine, the GIFs still aren't appearing in generated PDFs.

For what it's worth, we're using both static and animated GIFs, but I wouldn't think that would make a difference.

Any assistance would be appreciated. Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Cannot install prawn-gmagick

mojavelinux
Administrator
As far as I know, prawn-gmagick does not work on Windows (at the very least, we don't test that combination). And without prawn-gmagick, Asciidoctor PDF cannot read GIF files.

I do see that Abel reported he was able to get it to install on Windows: https://github.com/packetmonkey/prawn-gmagick/issues/9#issuecomment-585947260 However, since we don't test this, we cannot guarantee it will work. So the next step is to add this combination to the CI matrix so that we can verify it. Only then can we claim that it works.

Abel, do you think you could configure the workflow to do what you did there so we can test it?

Best Regards,

-Dan

On Tue, Feb 23, 2021 at 2:55 PM KLynn2021 [via Asciidoctor :: Discussion] <[hidden email]> wrote:
With Dan's permission, I'm adding onto this topic rather than creating a new one...

GIF images aren't showing up in PDFs created with Asciidoctor-PDF. We're working in Windows 10 with the most recent Asciidoctor and Asciidoctor-PDF versions.

I was getting the prompt to install prawn-gmagick, but even after following Abel's instructions above, and rebooting my machine, the GIFs still aren't appearing in generated PDFs.

For what it's worth, we're using both static and animated GIFs, but I wouldn't think that would make a difference.

Any assistance would be appreciated. Thanks.


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


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux