# Private method \`gsub' called for 2:Fixnum

**URL:** <https://www.ruby-forum.com/t/private-method-gsub-called-for-2-fixnum/150423>\
**Category:** Rails\
**Created:** [October 8, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/private-method-gsub-called-for-2-fixnum/150423 "2008-10-08T12:57:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 8, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/private-method-gsub-called-for-2-fixnum/150423/1 "2008-10-08T12:57:27Z")

</div>

RoR Error: “private method `gsub’ called for 2:Fixnum”

I am new to RoR and trying to complete “RailsSpace Social Networking”  
example, all works fine until I have implemented cookies using  
authorization\_token, and start getting following error when trying to  
login.

“private method `gsub’ called for 2:Fixnum”

I can make out that there is something related to String conversion  
but not sure go forward to resolve this.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 8, 2008, 2:50pm UTC](https://www.ruby-forum.com/t/private-method-gsub-called-for-2-fixnum/150423/2 "2008-10-08T14:50:22Z")

</div>

removed\_email\_address@domain.invalid wrote:

It’s hard to know without any more detail. The stack trace (the list of  
method calls etc that’s shown on the crash page) should point you  
towards the problem.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 8, 2008, 2:53pm UTC](https://www.ruby-forum.com/t/private-method-gsub-called-for-2-fixnum/150423/3 "2008-10-08T14:53:01Z")

</div>

Max W. wrote:

> removed\_email\_address@domain.invalid wrote:
> 
> It’s hard to know without any more detail. The stack trace (the list of  
> method calls etc that’s shown on the crash page) should point you  
> towards the problem.

Oh and by the way, when looking at the stack trace it’s best to assume  
that the problem isn’t with ruby, rails or whatever plugins you’re  
using, and just read down the list for the first reference to your own  
code 🙂
