Created
December 16, 2015 09:07
-
-
Save 85636682/b03cf99ab51a85fb97c7 to your computer and use it in GitHub Desktop.
安装geos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just got it working after 2 hours of tinkering. | |
For Ubuntu 14.04, libgeos 3.4.2, and RGeo 0.3.20 in Rails 4.2.1: | |
sudo apt-get -y install libgeos-3.4.2 libgeos-dev libproj0 libproj-dev | |
sudo ln -s /usr/lib/libgeos-3.4.2.so /usr/lib/libgeos.so | |
sudo ln -s /usr/lib/libgeos-3.4.2.so /usr/lib/libgeos.so.1 | |
In the Gemfile: | |
gem 'rgeo', require: false | |
Good luck! | |
#remove previous rgeo installation | |
gem uninstall rgeo | |
#install GEOS packages | |
sudo apt-get install libgeos-dev | |
sudo apt-get install libgeos-3.3.8 | |
#install proj package, I don't need it actually but not sure if it wasn't working because of this | |
sudo apt-get install proj | |
#Create a symbolic link named libgeos.so that points to the newly installed version of libgeos | |
cd /usr/lib | |
ln -s libgeos-3.3.8.so libgeos.so | |
#clone the repo of the rails project in other location, Rails apparently insisted on using the old, unlinked to GEOS, version of the gem | |
#And the reinstall the project's gems | |
bundle install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment