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

**URL:** <https://www.ruby-forum.com/t/undefined-method-for-e-string/177123>\
**Category:** Radiant CMS\
**Created:** [October 12, 2009, 1:26am UTC](https://www.ruby-forum.com/t/undefined-method-for-e-string/177123 "2009-10-12T01:26:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![grantspeelman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/da6949/32.png) [@grantspeelman](https://www.ruby-forum.com/u/grantspeelman)\
**Post date:** [October 12, 2009, 1:26am UTC](https://www.ruby-forum.com/t/undefined-method-for-e-string/177123/1 "2009-10-12T01:26:58Z")

</div>

Hi

I’m getting the following error:

NoMethodError in Admin/pagesController#index  
undefined method `^’ for “e”:String

The stack trace indicates that it’s located in:  
/usr/local/lib/ruby/gems/1.9.1/gems/radiant-0.9.0/lib/login\_system.rb:33:in  
`authenticate’

As for the environment. I’m running  
Ruby : ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin10.0.0]  
Rails : rails 2.3.4  
Gem : 1.3.5  
Radiant: radiant 0.9.0

The issue appears to be in the authentication and session checking.  
This was an issue with rails 2.3.4, s per other postings, due to a  
security fix. I’ve patched my version of ruby, built from source on my  
Mac OS X platform.

Does anyone have a fix or something that would workaround this issue ?

regards  
grant

---

<div class="post-metadata">

**Author:** ![grantspeelman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/da6949/32.png) [@grantspeelman](https://www.ruby-forum.com/u/grantspeelman)\
**Post date:** [October 12, 2009, 2:04am UTC](https://www.ruby-forum.com/t/undefined-method-for-e-string/177123/2 "2009-10-12T02:04:50Z")

</div>

FYI - i’ve solved my own problem - that’s a relief !!

Basically on further investigation (I re-read the stack trace a few  
times :-))I realised that the problem is not with the install of  
Radiant, but with the existing problem with Ruby. I had previously  
built the 1.9.1p243 version of Ruby and applied the patch described in :  
[https://rails.lighthouseapp.com/projects/8994/tickets/3144/a/261015/0001-ruby-1.9-friendly-secure\_compare.patch](https://rails.lighthouseapp.com/projects/8994/tickets/3144/a/261015/0001-ruby-1.9-friendly-secure_compare.patch)

This patch deals with the change in ruby 1.9 whereby a string[index]  
returns the character, whilst in ruby 1.8.x it returned the character  
code.

When I installed Radiant it also used contained the Rails version under  
the ./vendor/rails directory. My install was kindly using this version  
and not my patched version. Thus the solution was to either patch the  
‘message\_verifier.rb’ file or remove the vendor/rails directory.

grant

Grant Sayer wrote:

> Hi
> 
> I’m getting the following error:
> 
> NoMethodError in Admin/pagesController#index  
> undefined method `^’ for “e”:String
> 
> The stack trace indicates that it’s located in:  
> /usr/local/lib/ruby/gems/1.9.1/gems/radiant-0.9.0/lib/login\_system.rb:33:in  
> `authenticate’
> 
> As for the environment. I’m running  
> Ruby : ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin10.0.0]  
> Rails : rails 2.3.4  
> Gem : 1.3.5  
> Radiant: radiant 0.9.0
> 
> The issue appears to be in the authentication and session checking.  
> This was an issue with rails 2.3.4, s per other postings, due to a  
> security fix. I’ve patched my version of ruby, built from source on my  
> Mac OS X platform.
> 
> Does anyone have a fix or something that would workaround this issue ?
> 
> regards  
> grant
