authentication error

28 views
Skip to first unread message

jimmygoogle

unread,
Oct 27, 2007, 4:39:11 PM10/27/07
to Ruby on Rails: Talk
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
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

Mark Reginald James

unread,
Oct 28, 2007, 7:41:11 AM10/28/07
to rubyonra...@googlegroups.com
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.

Mark Reginald James

unread,
Oct 28, 2007, 10:54:40 AM10/28/07
to rubyonra...@googlegroups.com
Mark Reginald James 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

jimmygoogle

unread,
Oct 28, 2007, 3:27:03 PM10/28/07
to Ruby on Rails: Talk
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

Mark Reginald James

unread,
Oct 28, 2007, 6:31:56 PM10/28/07
to rubyonra...@googlegroups.com
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.

jimmygoogle

unread,
Oct 29, 2007, 10:24:25 PM10/29/07
to Ruby on Rails: Talk
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

On Oct 28, 6:31 pm, Mark Reginald James <m...@bigpond.net.au> wrote:
> jimmygoogle wrote:
> > I ran the steps below but my app still gets the same error

> > - installed ruby from source fromftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p110.tar.gz

Reply all
Reply to author
Forward
0 new messages