# Undefined method \`^' for "0":String

**URL:** <https://www.ruby-forum.com/t/undefined-method-for-0-string/177846>\
**Category:** Rails\
**Created:** [October 25, 2009, 8:51am UTC](https://www.ruby-forum.com/t/undefined-method-for-0-string/177846 "2009-10-25T08:51:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![teebye](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85e7bf/32.png) [@teebye](https://www.ruby-forum.com/u/teebye)\
**Post date:** [October 25, 2009, 8:51am UTC](https://www.ruby-forum.com/t/undefined-method-for-0-string/177846/1 "2009-10-25T08:51:20Z")

</div>

Showing app/views/layouts/admin.html.erb where line #51 raised:

undefined method `^’ for “0”:String

Extracted source (around line #51):

48:   
  
49:   
50:

  
51: \<% if flash[:notice] %\>  
52: 
\<%= flash[:notice] %\>
  
53: \<% end %\>  
54:

---

<div class="post-metadata">

**Author:** ![teebye](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85e7bf/32.png) [@teebye](https://www.ruby-forum.com/u/teebye)\
**Post date:** [October 25, 2009, 8:59am UTC](https://www.ruby-forum.com/t/undefined-method-for-0-string/177846/2 "2009-10-25T08:59:25Z")

</div>

You might be running into the issue mentioned here -  
[https://rails.lighthouseapp.com/projects/8994/tickets/3144-undefined-method-for-string-ror-234](https://rails.lighthouseapp.com/projects/8994/tickets/3144-undefined-method-for-string-ror-234)

If so, there is a patch for it in the link 🙂

Regards,  
Kashyap

---

<div class="post-metadata">

**Author:** ![teebye](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85e7bf/32.png) [@teebye](https://www.ruby-forum.com/u/teebye)\
**Post date:** [October 25, 2009, 2:29pm UTC](https://www.ruby-forum.com/t/undefined-method-for-0-string/177846/3 "2009-10-25T14:29:40Z")

</div>

C K Kashyap wrote:

> You might be running into the issue mentioned here -  
> [#3144 undefined method `^' for String - RoR 2.3.4 - Ruby on Rails - rails](https://rails.lighthouseapp.com/projects/8994/tickets/3144-undefined-method-for-string-ror-234)
> 
> If so, there is a patch for it in the link 🙂
> 
> Regards,  
> Kashyap

how to?

---

<div class="post-metadata">

**Author:** ![teebye](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85e7bf/32.png) [@teebye](https://www.ruby-forum.com/u/teebye)\
**Post date:** [October 25, 2009, 3:11pm UTC](https://www.ruby-forum.com/t/undefined-method-for-0-string/177846/4 "2009-10-25T15:11:06Z")

</div>

> ## how to?

download the patch\_file from the link I sent -

If you are on a unix like os - you need to navigate to (your gem  
installation path)/activesupport/lib/active\_support and run patch -p1  
\< patch\_file and provide the name message\_verifier.rb

if on windows just google and find out how to apply the patch … in  
the worst case, open the patch file and figure out the changes that  
need to be done in message\_verifier.rb…
