rgeo / rgeo-activerecord

RGeo ActiveRecord extensions and tools for spatial connection adapters
Other
89 stars 64 forks source link

rake aborted on db:create, rails 4.2.1, activerecord-postgis-adapter 3.0.0 #21

Closed ltramos closed 9 years ago

ltramos commented 9 years ago

Hi,

I'm trying to follow the instructions from http://daniel-azuma.com/articles/georails/part-2. But I hit a wall up to the point when I either try to "rake db:create" or simply "rake -T". I get this result:

rake aborted! LoadError: cannot load such file -- active_record/connection_adapters/postgis_adapter/railtie /Users/user/Desktop/rails_project/heatmap/config/application.rb:4:in require' /Users/user/Desktop/rails_project/heatmap/config/application.rb:4:in<top (required)>' /Users/user/Desktop/rails_project/heatmap/Rakefile:4:in require' /Users/user/Desktop/rails_project/heatmap/Rakefile:4:in<top (required)>' /Users/user/.rvm/gems/ruby-2.1.2@rails4gemset/bin/ruby_executable_hooks:15:in eval' /Users/user/.rvm/gems/ruby-2.1.2@rails4gemset/bin/ruby_executable_hooks:15:in

' (See full trace by running task with --trace)

Any idea what's causing this? I have the following environment: Ruby 2.1.2, Rails 4.2.1, PG 9.4, Postgis 2.0, Geos 3.4.2, Proj 4.9.1 running on Mac OS X Yosemite.

Thanks for your time.

ltramos commented 9 years ago

Please disregard this.

I managed to make it work by using 'require 'active_record/connection_adapters/postgis_adapter' instead of 'require 'active_record/connection_adapters/postgis_adapter/railtie' in application.rb

teeparham commented 9 years ago

Yes - the files/paths in activerecord-postgis-adapter have changed internally in version 3.0. Thanks for sharing your solution.