# NoMethodError: undefined method \`configuration' for #\<String inside railties?

**URL:** <https://www.ruby-forum.com/t/nomethoderror-undefined-method-configuration-for-string-inside-railties/139015>\
**Category:** Rails\
**Created:** [May 29, 2008, 10:49pm UTC](https://www.ruby-forum.com/t/nomethoderror-undefined-method-configuration-for-string-inside-railties/139015 "2008-05-29T22:49:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jameskelly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3ab097/32.png) [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Post date:** [May 29, 2008, 10:49pm UTC](https://www.ruby-forum.com/t/nomethoderror-undefined-method-configuration-for-string-inside-railties/139015/1 "2008-05-29T22:49:58Z")

</div>

I’m in the middle of upgrading an application to rails 2.0.2 from  
1.2.5 and on startup I see this message printed out:  
#\<NoMethodError: undefined method `configuration’ for #\<String:  
0x1145040\>\>  
After some hacking I’ve figured out it emanates from plugin.rb in  
railties (railties/lib/rails/plugin.rb) in the following block:

def evaluate\_init\_rb(initializer)  
if has\_init\_file?  
silence\_warnings do  
# Allow plugins to reference the current configuration  
object  
config = initializer.configuration

```
         eval(IO.read(init_path), binding, init_path)
       end
     end
  end

```

In the instances I have seen the failure occur, initializer is a  
string that is the path to an init.rb file inside a plugin.

Has anyone seen this? Is it harmless? Is it because of some plugins  
not doing the right thing for rails 2?

thanks
