Forum: Ruby on Rails Unknown type 'inet' for column 'ip'

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
41cfad2064d52a800978b0289a3138a0?d=identicon&s=25 David Edwards (revlob)
on 2007-03-16 17:14
I'm using Postgresql as my database backend, and whenver I run "rake
db:schema:dump", the following line appears in db/schema.rb:

# Could not dump table "comments" because of following StandardError
#   Unknown type 'inet' for column 'ip'

Anyone encountered this problem before and found a way around it?
5c19f2d52879a1e10670c7334ba4c7e3?d=identicon&s=25 Lugovoi Nikolai (Guest)
on 2007-03-16 17:56
(Received via mailing list)
set config.active_record.schema_format = :sql in config/environment.rb ?

2007/3/16, David Edwards <>:
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (au5lander)
on 2007-03-16 18:06
(Received via mailing list)
you have a postgresql INET column type in your table.  INET is not a
'standard' SQL column type and rails is telling you it doesn't
understand the type.
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (au5lander)
on 2007-09-25 23:10
(Received via mailing list)
as far as a way around it goes, i don't think there is much of
anything you can do other than changing the column type or not using
rake db:schema:dump.
4375b4aca04b8d72482fd409fb6d0b47?d=identicon&s=25 Roderick van Domburg (roderickvd)
on 2007-09-26 11:01
I added support for the inet and cidr datatypes to the PostgreSQL
adapter and that support currently lives in Edge Rails. Try it out!

Roderick van Domburg
This topic is locked and can not be replied to.