rgeo / rgeo-proj4

Proj4 extension for rgeo.
MIT License
13 stars 14 forks source link

invalid option: --with-proj-dir=/usr/local/bin for command gem install rgeo-proj4 --with-proj-dir=/usr/local/bin #12

Closed ddd1600 closed 3 years ago

ddd1600 commented 3 years ago

Fundamentally, the issue is this error:

RGeo::Error::UnsupportedOperation: Coordinate system 'proj4' is not supported.

I've been using RGeo for years. Have never had to use the rgeo-proj4 gem, which I've replaced in my Gemfile from the previous 'rgeo' gem. I've followed all the online guides on making sure proj is already installed, making sure its located where it should be, but RGeo still can't find the Proj library.

Please help! Thanks

keithdoggett commented 3 years ago

I'm not sure why that build flag isn't working. I haven't been able to get it to work either, but I'd imagine you shouldn't have to specify /usr/local/bin since that should be in your PATH.

Is there any output when you install it?

What ruby code are you trying?

Does this work?

require 'rgeo'
require 'rgeo/proj4'

RGeo::CoordSys::Proj4.supported?
# => true
armahillo commented 3 years ago

You have to put -- before the --with-proj-dir option. So your command would look like ths:

gem install rgeo-proj4 -- --with-proj-dir=/usr/local/bin 

This may or may not fix your issue

keithdoggett commented 3 years ago

@armahillo that's correct. Thanks!