Skip to content
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

Cannot get windows gem to install on windows #10

Closed
ghost opened this issue Dec 31, 2011 · 6 comments
Closed

Cannot get windows gem to install on windows #10

ghost opened this issue Dec 31, 2011 · 6 comments

Comments

@ghost
Copy link

ghost commented Dec 31, 2011

I'm really looking forward to using your library, but I cannot get it to install. Your assistance is very much appreciated.

I have rmagick installed as evidenced by:

D:\Ruby\Projects\AAN\lib\bin>gem list rm
*** LOCAL GEMS ***
rmagick (2.12.0 mswin32)

But when attempt to install your gem, I get this blasted message.

D:\Ruby\Projects\AAN\lib\bin>gem install axlsx
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing axlsx:
        ERROR: Failed to build gem native extension.

        c:/ruby/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
Invalid drive specification.
Unable to get ImageMagick version
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=c:/ruby/bin/ruby


Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to c:/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

ImageMagic is in the path, as evidenced here.

D:\Ruby\Projects\AAN\lib\bin>path
PATH=c:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\pw\adm;c:\pw\pst;C:\PW\firstprep;c:\pw\ls;c:
\pw\ls\system;C:\Program Files\Common Files;C:\Program Files\Common Files\CMS Direct;C:\Program Files\Common Files\First
logic;C:\Program Files\Common Files\Business Objects\License Manager;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Progr
am Files\Common Files\Group1\Runtime;C:\Program Files\Microsoft SQL Server\90\Tools\binn;C:\devkit\bin;C:\devkit\mingw\m
ingw32\bin;C:\Program Files\ImageMagick-6.5.6-Q8;;C:\PW\rapid;
@randym
Copy link
Owner

randym commented Jan 4, 2012

Hi Don,

ImageMagick installation can be a challenge on any platform...

I think this blog post will point you in the right direction
http://phosphor-escence.blogspot.com/2010/10/install-rmagick-on-mingw-and-msys.html

The most important parts would be to use the binary installer, include headers, and make sure to install it to a directory that does not contain spaces.

Cheers,

Randy

@randym randym closed this as completed Jan 4, 2012
@ghost
Copy link
Author

ghost commented Jan 4, 2012

Bless You, Sir!

On Tue, Jan 3, 2012 at 9:21 PM, Randy Morgan <
reply@reply.github.com

wrote:

Hi Don,

ImageMagick installation can be a challenge on any platform...

I think this block post will point you in the right direction

http://phosphor-escence.blogspot.com/2010/10/install-rmagick-on-mingw-and-msys.html

The most important parts would be to use the binary installer, include
headers, and make sure to install it to a directory that does not contain
spaces.

Cheers,

Randy


Reply to this email directly or view it on GitHub:
#10 (comment)

@binaryphile
Copy link

When it's trying to get the ImageMagick version, extconf.rb is running the identify command from ImageMagick and parsing the output. If the ImageMagick command isn't early enough in the path, some other identify command gets run, which throws the invalid drive specification result. The solution is to put the ImageMagick directory at the beginning of your path (and don't forget to restart your shell to get the new path).

The other trick is getting it to recognize the include and lib directories from ImageMagick. I always run the command gem install rmagick -- '--with-opt-dir="[path to ImageMagick Program Files directory]"'. Note the tricky use of quotes...double-quotes around the path and single quotes around the entire --with-opt-dir option. It is acceptable to have spaces in the path to the ImageMagick directory with this command. Also, the directory of interest is the main directory under Program Files, the one that contains lib and include, just to be specific.

Of course, you have to have installed ImageMagick with the development headers option for those directories to be there.

@randym
Copy link
Owner

randym commented Jun 13, 2012

@lilleyt Great Info mate. I really hope it helps people out there trying to get rmagick up and running.

For Axlsx, we removed the dependency a few months ago so if anyone out there is struggling with rmagick - you don't need it anymore, please use the most recent version of axlsx.

@ghost
Copy link
Author

ghost commented Jun 14, 2012

That's great...removing the dependency. How did you do it?

dvn

On Wed, Jun 13, 2012 at 6:42 PM, Randy Morgan <
reply@reply.github.com

wrote:

@lilleyt Great Info mate. I really hope it helps people out there trying
to get rmagick up and running.

For Axlsx, we removed the dependency a few months ago so if anyone out
there is struggling with rmagick - you don't need it anymore, please use
the most recent version of axlsx.


Reply to this email directly or view it on GitHub:
#10 (comment)

@randym
Copy link
Owner

randym commented Aug 11, 2012

axlsx was only using rmagick to render fonts, and get metrics on the pixel width. It turns out that this as the spec is relying on the 'default font', it means we can isolate which characters exceed the maximum char width for the font, and use matching to figure out how many exceed that width.

aardvarkk pushed a commit to aardvarkk/axlsx that referenced this issue Dec 16, 2019
…p_cache

Fix Relationship.instances cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants