spree/spree — Issue #1247: undefined method `group_by_products_id'  error in heroku
Author: GutenYe
Created: 2012-03-09 09:25:52+00:00
State: open

when I visit /admin/products in heroku, I got

```
2012-03-09T07:08:05+00:00 app[web.1]:
2012-03-09T07:08:05+00:00 app[web.1]:
2012-03-09T07:08:05+00:00 app[web.1]: Started GET "/admin/products" for 173.255.252.19 at 2012-03-09 07:08:05 +0000
2012-03-09T07:08:05+00:00 app[web.1]:
2012-03-09T07:08:05+00:00 app[web.1]: NoMethodError (undefined method `group_by_products_id' for []:ActiveRecord::Relation):
2012-03-09T07:08:05+00:00 app[web.1]:
2012-03-09T07:08:05+00:00 app[web.1]:
2012-03-09T07:08:05+00:00 app[web.1]:
2012-03-09T07:08:05+00:00 app[web.1]: cache: [GET /admin/products] miss
2012-03-09T07:08:05+00:00 app[web.1]: Processing by Spree::Admin::ProductsController#index as HTML
2012-03-09T07:08:05+00:00 app[web.1]: Completed 500 Internal Server Error in 13ms
2012-03-09T07:08:05+00:00 heroku[router]: GET foo.herokuapp.com/admin/products dyno=web.1 queue=0 wait=0ms service=20ms status=500 bytes=728
```

but every works well in development.

### Environemnt

heroku: cedar stack. postgresql database.
development: ruby 1.9.3, spree 1.0.1, rails 3.1.4, postgresql 9.1.3

### How I deploy to heroku

```
$ git push heroku master
$ heroku run db:admin:create
```