# Acts\_as\_authenticated current\_user in a model with rails 2.02 fails

**URL:** <https://www.ruby-forum.com/t/acts-as-authenticated-current-user-in-a-model-with-rails-2-02-fails/142754>\
**Category:** Rails\
**Created:** [July 11, 2008, 3:22am UTC](https://www.ruby-forum.com/t/acts-as-authenticated-current-user-in-a-model-with-rails-2-02-fails/142754 "2008-07-11T03:22:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [July 11, 2008, 3:22am UTC](https://www.ruby-forum.com/t/acts-as-authenticated-current-user-in-a-model-with-rails-2-02-fails/142754/1 "2008-07-11T03:22:04Z")

</div>

Hi - I’m using acts\_as\_authenticated on my local machine, in a model I  
ask

if current\_user

and it works locally no problem. I upload to my host, and suddenly I  
get :

undefined local variable or method `current\_user’ for #\<Class:  
0x2b0e8c321ca0\>

both local and host user rails 2.02. using ruby 1.86 locally, and  
1.85 on the host, but that shouldn’t matter.

Anyone have any ideas why?

Thanks,  
Dino
