Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

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

Open
MarcosMenegazzo opened this issue May 9, 2014 · 2 comments

Comments

@MarcosMenegazzo
Copy link

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
Copy link
Author

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
Copy link
Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant