Model Search Returning a NoMethodError #1579

Closed
JohnGoodman opened this Issue Mar 25, 2013 · 5 comments

Projects

None yet

5 participants

@JohnGoodman

Hey, when I search for something in rails admin I get the following error:

 NoMethodError (undefined method `[]' for nil:NilClass):
 vendor/bundle/ruby/1.9.1/bundler/gems/rails_admin-d9b5c1ee9ca9/lib/rails_admin/adapters/active_record.rb:140:in `get_conditions_hash'

I get this error for any model I search. The funny thing is, searching works fine locally, but on Heroku this is what I get. Here is a gist of my config file: https://gist.github.com/JohnGoodman/aecdc21999af2da9b813

Can someone provide some insight as to what is causing this error?

Thanks and let me know if you need any more information.

@barsukov

I get same errors when my type of fields in rails admin config different with fields in my DataBase.

@YoranBrondsema

I'm getting the same error.

@aliismayilov

Over a year ago and not solved yet?

@FlaviaFortes

I'm getting this error only on production environment. Do you guys have some workaround yet?

@aliismayilov

The problem is at this line: https://github.com/sferik/rails_admin/blob/28bd03fa65277d0bb5b84069bf8c046f7fd1fbef/lib/rails_admin/adapters/active_record.rb#L300

On heroku Rails.configuration.database_configuration['production'] is not defined.

@mshibuya mshibuya closed this in #1941 Mar 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment