# ArgumentError: interning empty string and enum-column plugin

**URL:** <https://www.ruby-forum.com/t/argumenterror-interning-empty-string-and-enum-column-plugin/112922>\
**Category:** Rails\
**Created:** [August 24, 2007, 2:44pm UTC](https://www.ruby-forum.com/t/argumenterror-interning-empty-string-and-enum-column-plugin/112922 "2007-08-24T14:44:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![clemrock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c57346/32.png) [@clemrock](https://www.ruby-forum.com/u/clemrock)\
**Post date:** [August 24, 2007, 2:44pm UTC](https://www.ruby-forum.com/t/argumenterror-interning-empty-string-and-enum-column-plugin/112922/1 "2007-08-24T14:44:32Z")

</div>

Hello,

I am a developer who has just started working on a large scale  
website in a team of 5 other developers. One of the developers has  
introduced some enum columns into the the database. Now, by default,  
active record doesn’t support enum column types but I have added the  
enum-column plugin into our project. This has worked very well except  
for a few instances where he introduced enums that featured and empty  
string IE. enum(’’,‘Artist’,‘Venue’,‘Fan’,‘Label’).

This causes the mysql\_adapter.rb section of the plugin to throw a  
“ArgumentError: interning empty string” error in this section of code:

```auto
class MysqlColumnWithEnum < MysqlColumn
      include ActiveRecordEnumerations::Column

      def initialize(name, default, sql_type = nil, null = true)
        if sql_type =~ /^enum/i

          values = sql_type.sub(/^enum\('([^)]+)'\)/i,
'\1').split("','").map { |v| v.intern}

          default = default.intern if default and !default.empty?
        end
        super(name, default, sql_type, null, values)
      end
    end
  end
```

Does anyone know how I can work around this error?

Thanks for your time!

Clem C

---

<div class="post-metadata">

**Author:** ![clemrock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c57346/32.png) [@clemrock](https://www.ruby-forum.com/u/clemrock)\
**Post date:** [July 10, 2008, 2:44am UTC](https://www.ruby-forum.com/t/argumenterror-interning-empty-string-and-enum-column-plugin/112922/2 "2008-07-10T02:44:38Z")

</div>

hello,  
were you able to find a workaround for this, resolve this empty string  
problem? i see that no one ever replied to your post, and i am having  
a similar problem at the moment.

On Aug 24 2007, 5:44 am, Clem R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
