[Rails] Create a scope that groups unique id and recent date

2013-12-04 Thread Bo Pritchard
I want to write a scope that returns the most recent (created_at) row for each person_id So this table id person_id created_at 11112013-12-01 08:00 22222013-11-20 07:00 31112013-12-10 09:00 43332013-10-21 08:00 5333

[Rails] Re: ActiveRecord::ConnectionNotEstablished error

2010-09-08 Thread Bo Pritchard
Tony Primerano wrote: > I've never used sqlserver before but I would start with the > development.log file for clues. > > Assuming there is a command line client can you connect to the > database with it? Can you ping your db host "mordor"? In dev the > host is usually localhost (in linuxland

[Rails] ActiveRecord::ConnectionNotEstablished error

2010-09-07 Thread Bo Pritchard
I've attached my database.yml I've installed gem install activerecord-sqlserver-adapter But when I navigate to a simple page I get the ActiveRecord::ConnectionNotEstablished error Any ideas what I should be checking? Ruby 1.92 Rails 3 Attachments: http://www.ruby-forum.com/attachment/5016/datab