# Problems with setup.rb and metaconfig

**URL:** <https://rubytalk.org/t/problems-with-setup-rb-and-metaconfig/41598>\
**Category:** ruby-talk\
**Created:** [23 October 2007 12:45 UTC](https://rubytalk.org/t/problems-with-setup-rb-and-metaconfig/41598 "2007-10-23T12:45:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Patterson](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@Matt\_Patterson](https://rubytalk.org/u/Matt_Patterson)\
**Post date:** [23 October 2007 12:45 UTC](https://rubytalk.org/t/problems-with-setup-rb-and-metaconfig/41598/1 "2007-10-23T12:45:46Z")

</div>

I'm doing some fiddling around with a setup.rb package, and wanted to be able to pass in another invocation time option, a la ruby setup.rb --option. The docs seem to suggest using metaconfig to add this, so I rolled in a metaconfig file into the package root that looked like this:

add\_path\_config 'gem\_install\_root', '', 'Path to root of build "filesystem"'

When setup.rb gets called (from a make process) I get a nasty error about frozen arrays:

/usr/bin/ruby1.8 setup.rb config --siterubyver=/usr/lib/ruby/1.8  
setup.rb:100:in `push': can't modify frozen array (TypeError)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from setup.rb:100:in `add'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from setup.rb:508:in `add\_path\_config'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /home/matt/sandbox/packages/libgems-ruby-0.9.4/metaconfig:1:in `load\_script'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from setup.rb:831:in `run\_metaconfigs'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from setup.rb:807:in `invoke'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from setup.rb:773:in `invoke'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from setup.rb:1578

Am I doing something dumb here? I'd be grateful for any pointers...

Matt

> **···**
>
> --  
> &nbsp;&nbsp;&nbsp;Matt Patterson | Design & Code  
> &nbsp;&nbsp;&nbsp;\<matt at reprocessed org\> | [http://www.reprocessed.org/](http://www.reprocessed.org/)
