Search code examples
ruby-on-railsmongodbgeolocationrails-geocoder

Ruby on Rails based website and app


I have started coding during my free time for over a year now. I had a social community idea which will be location based which basically deals with locations and nearby trending places. I did some 10 minute video about scaffolding and have been totally smitten by Ruby on Rails. I really want to go ahead and make it on RoR.

However I don't know how to work with databases dealing with locations. I have done some research and looks like Mongo.DB is the one which is the most popular considering what 4square did. But I was wondering can we work with Active Record ? I saw a gem called geocoder , will it help me with the problem I am trying to tackle ?

Again , I have only coded in C++ , and haven't exactly worked with databases .

Which gems and tools should I be using for it ? Ruby and Mongo.db or Ruby on Rails simple using gems like geocoder ?

I felt encouraged seeing a website called www.foodspotting.com , it shows they have coded in ruby on rails ! Can someone give some good combination so that I can start thinking in the right direction ?

ruby on rails with mongo? ruby with sinatra ?

although I am trying to stick to the RoR genre , as I have subscribed to the Michael Hartl tutorials .


Solution

  • I'd suggest using PostgreSQL with PostGIS. You'll need the activerecord-postgis-adapter gem to make that work with ActiveRecord.

    However, a word of warning, dealing with spatial data isn't easy, and if this is your first Ruby on Rails application and your first database-backed application I would say that you're biting off a fair bit more than you can be expected to chew. Start small, start easy, work your way up.