rgeo / activerecord-spatialite-adapter

ActiveRecord connection adapter for SpatiaLite, based on sqlite3 and rgeo
11 stars 14 forks source link

Rake db:create does not finish while a huge database is created #7

Open MarcosMenegazzo opened 10 years ago

MarcosMenegazzo commented 10 years ago

Hello, I'm trying spatialite with Rails 3.2 for the first time. I followed the instructions in readme, but when i try to run "rake db:create", the script never ends and i see the .sqlite3 file generated growing without control. When i killed the ruby process, my sqlite3 db was about 2GB. i'm using ubuntu 14.04, and all libraries were installed using apt-get. At this moment i tried to build libspatialite from source and use it as libspatialite parameter in database.yml, but still the error persists.

Can you help me or send instructions about how to debug this?

MarcosMenegazzo commented 10 years ago

Steps to reproduce: rails 3.2.0 new police-report cd police-report/ gem install activerecord-spatialite-adapter sudo apt-cache search spatialite | grep spatialite sudo apt-get install libspatialite-dev sudo dpkg -L libspatialite-dev vim

  1. Added gem 'activerecord-spatialite-adapter' to Gemfile
  2. Modified adapter to 'spatialite' in config/database.yml
  3. Added libspatialite=/usr/lib/x86_64-linux-gnu/libspatialite.so to config/database.yml
  4. Added require 'active_record/connection_adapters/spatialite_adapter/railtie' to config/application.rb :xa bundle install bundle exec rake db:create
MarcosMenegazzo commented 10 years ago

https://github.com/MarcosMenegazzo/police-report.git