# Authentication error

**URL:** <https://www.ruby-forum.com/t/authentication-error/118502>\
**Category:** Rails\
**Created:** [October 27, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/authentication-error/118502 "2007-10-27T22:39:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmygoogle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Post date:** [October 27, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/authentication-error/118502/1 "2007-10-27T22:39:45Z")

</div>

I am not sure if I am in the right forum but here is to goes. I am a  
rails noob. I am trying to setup authentication in my current small  
cookbook app. I am following the basic tutorials. I am trying to use  
“Acts\_as\_authenticated.”

I ran these commands:  
ruby script/plugin source [HTTP://svn.techno-weenie.net/projects/plugins](HTTP://svn.techno-weenie.net/projects/plugins)  
ruby script/plugin install acts\_as\_authenticated  
ruby script/generate authenticated user account  
rake db:migrate

I added “before\_filter :login\_required, :only =\>  
[:create, :edit, :update, :destroy]” to my controller then I launch  
the app in the browser. The site functions as it should then when I  
click on a link that needs authentication (‘edit’ link) I get:

NoMemoryError in RecipeController#edit  
negative allocation size (or too big)

Then I cannot get anything working(login,logout again until I restart  
mongrel. Anyone seen this?

here are my specs  
fedora 6  
ruby 1.8.5  
mysql 5.0.27

---

<div class="post-metadata">

**Author:** ![jimmygoogle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Post date:** [October 28, 2007, 3:55pm UTC](https://www.ruby-forum.com/t/authentication-error/118502/2 "2007-10-28T15:55:49Z")

</div>

Mark Reginald J. wrote:

> In the end the only thing that fixed it was installing Ruby 1.8.6  
> (p110) from source, and re-installing all the gems. Perhaps it  
> was caused by some bad FC6 update. So if nothing simple fixes it  
> the least-messy major thing to do may be to update to FC7.

Checking my logs, there was a recent update of the ruby rpms  
to version 1.8.5.113-1. You may fix your problem by changing  
to a later or earlier version:

[http://www.rpmfind.net/linux/rpm2html/search.php?query=ruby](http://www.rpmfind.net/linux/rpm2html/search.php?query=ruby)

–  
We develop, watch us RoR, in numbers too big to ignore.

---

<div class="post-metadata">

**Author:** ![jimmygoogle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Post date:** [October 28, 2007, 12:41pm UTC](https://www.ruby-forum.com/t/authentication-error/118502/3 "2007-10-28T12:41:57Z")

</div>

jimmygoogle wrote:

> NoMemoryError in RecipeController#edit  
> negative allocation size (or too big)
> 
> Then I cannot get anything working(login,logout again until I restart  
> mongrel. Anyone seen this?
> 
> here are my specs  
> fedora 6  
> ruby 1.8.5  
> mysql 5.0.27

I use the same system software, and have been struggling with the  
same NoMemoryError on some actions for the past few weeks.

In the end the only thing that fixed it was installing Ruby 1.8.6  
(p110) from source, and re-installing all the gems. Perhaps it  
was caused by some bad FC6 update. So if nothing simple fixes it  
the least-messy major thing to do may be to update to FC7.

Please post what you did if you do manage to fix it.

–  
We develop, watch us RoR, in numbers too big to ignore.

---

<div class="post-metadata">

**Author:** ![jimmygoogle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Post date:** [October 28, 2007, 8:27pm UTC](https://www.ruby-forum.com/t/authentication-error/118502/4 "2007-10-28T20:27:24Z")

</div>

I ran the steps below but my app still gets the same error

- installed ruby from source from  
ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p110.tar.gz
- then gem install -v=1.2.3 rails

---

<div class="post-metadata">

**Author:** ![jimmygoogle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Post date:** [October 28, 2007, 11:32pm UTC](https://www.ruby-forum.com/t/authentication-error/118502/5 "2007-10-28T23:32:52Z")

</div>

jimmygoogle wrote:

> I ran the steps below but my app still gets the same error
> 
> - installed ruby from source from ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p110.tar.gz
> - then gem install -v=1.2.3 rails

If you’re sure your app is using the new Ruby, your problem  
may have a different cause, like an unterminated recursion.  
What is the full stack trace of the error?

You can instead try updating the set of ruby rpms to a later  
version. They can be found at the link in my last post.

–  
We develop, watch us RoR, in numbers too big to ignore.

---

<div class="post-metadata">

**Author:** ![jimmygoogle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Post date:** [October 30, 2007, 3:24am UTC](https://www.ruby-forum.com/t/authentication-error/118502/6 "2007-10-30T03:24:39Z")

</div>

I did a yum remove ‘_ruby_’ and then did a clean install like i  
explained above and it seems to have fixed it. thanks for your help
