"bad_type" error when trying to create mnesia tables
<p>For the life of me, can't figure this out. I'm trying to create mnesia tables, but keep getting this weird error.</p>

<p>Here is my command:</p>

<pre><code>ok = mnesia:create_schema(Nodes),
rpc:multicall(Nodes, application, start, [mnesia]),
{_, ok} = mnesia:create_table(rr_events,
        [{attributes, record_info(fields, rr_events)},
         {index, [#rr_events.key]},
         {disc_copies, Nodes}]),
rpc:multicall(Nodes, application, stop, [mnesia]).
</code></pre>

<p>Here is my record:</p>

<pre><code>-record(rr_events, {key, events=[]}).
</code></pre>

<p>Here is the error:</p>

<pre><code>=PROGRESS REPORT==== 24-Mar-2016::21:53:42 ===
         application: mnesia
          started_at: nonode@nohost
** exception error: no match of right hand side value
                    {aborted,{bad_type,rr_events,{index,[2]}}}
     in function  rr:install/1 (c:/Users/zzzz/Projects/zzz/zzz/rr/rr/_build/default/lib/rr/src/rr.erl, line 13)
</code></pre>

<p>Any idea what this might be? Cannot figure this out.</p>