Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported field datatype: uuid #1681

Closed
chaekit opened this issue Jun 30, 2013 · 11 comments
Closed

Unsupported field datatype: uuid #1681

chaekit opened this issue Jun 30, 2013 · 11 comments

Comments

@chaekit
Copy link

chaekit commented Jun 30, 2013

I use postgres and active-record-postgis adapter

@tank-bohr
Copy link

Try to add

class RailsAdmin::Config::Fields::Types::Uuid < RailsAdmin::Config::Fields::Base
  RailsAdmin::Config::Fields::Types::register(self)
end

to your rails_admin initializer

@kidlab
Copy link

kidlab commented Oct 9, 2013

It does not work for me :( It still cannot search by ID.

@epinault
Copy link

I tried on a brand new Rails 4.0.4, Ruby 2.1 and latest rails admin and seems to work for me

@undergroundwebdesigns
Copy link

Adding the type for Uuid initially seemed to worked for me, but now when trying to create a model that "belongs_to" another (where the belongs_to id is a UUID) I'm getting an error from the DB: PG::InvalidTextRepresentation: ERROR: invalid input syntax for uuid: ""

It looks like the UUID is somehow being blanked out before being sent to the DB. Anyone been able to get this to work?

I'm using Rails 4.1 and Ruby 2.1

@undergroundwebdesigns
Copy link

Nevermind, my mistake (I wasn't including data for a DB required field that happened to be a UUID, but the error isn't actually UUID related).

@yonkeltron
Copy link

I can confirm this issue on Rails 4.1.4, Ruby 2.1.2 and PostgreSQL 9.3.4.2.

screen shot 2014-08-14 at 2 38 09 pm

The error occurs in this project's code base: https://github.com/SexualHealthInnovations/PrivateResults

Running:

$ uname -a
Darwin Concurrent-Chickpea.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun  3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64

Happy to provide any other information that I can.

@brain-geek
Copy link

@tank-bohr 's solution worked for me for current version in master.

Rails 4.2.0.rc1, Postgresql.

@nicolo
Copy link

nicolo commented Dec 30, 2014

@brain-geek Are you able to filter on uuid? I implemented @tank-bohr's fix and display works, but I cannot search or filter any of my uuid columns.

@horacix
Copy link

horacix commented Mar 17, 2015

Thanks, the proposed solution works for other datatypes as well (Tested with SQL Server varchar)

@dkperson
Copy link

dkperson commented Jun 9, 2015

Thanks, I got this error after getting the 'Ahoy' gem, and the proposed solution fixed it!

@krainboltgreene
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests