# Why am I getting "undefined local variable or method \`acts\_a

**URL:** <https://www.ruby-forum.com/t/why-am-i-getting-undefined-local-variable-or-method-acts-a/53208>\
**Category:** Rails\
**Created:** [January 29, 2006, 3:10am UTC](https://www.ruby-forum.com/t/why-am-i-getting-undefined-local-variable-or-method-acts-a/53208 "2006-01-29T03:10:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![softwareengineer\_99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@softwareengineer\_99](https://www.ruby-forum.com/u/softwareengineer_99)\
**Post date:** [January 29, 2006, 3:10am UTC](https://www.ruby-forum.com/t/why-am-i-getting-undefined-local-variable-or-method-acts-a/53208/1 "2006-01-29T03:10:51Z")

</div>

Hello,

I recently installed acts\_as\_taggable using the following command:

gem install acts\_as\_taggable

# output follows

Attempting local installation of ‘acts\_as\_taggable’  
Local gem file not found: acts\_as\_taggable\*.gem  
Attempting remote installation of ‘acts\_as\_taggable’  
Updating Gem source index for: [http://gems.rubyforge.org](http://gems.rubyforge.org)  
Successfully installed acts\_as\_taggable-1.0.4  
Installing RDoc documentation for acts\_as\_taggable-1.0.4…  
And added the following line to environment.rb  
require\_gem “acts\_as\_taggable-1.0.4”

However when I add the following to my target class (resource.rb):  
acts\_as\_taggable

I get the following error

undefined local variable or method `acts\_as\_taggable’ for Resource:Class

Why am I getting this error and how can I fix it? My installation seemed  
to have gone OK so what am I missing here?

I have been searching everywhere and any pointers are greatly  
appreciated.

Thanks  
Frank

---

<div class="post-metadata">

**Author:** ![softwareengineer\_99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@softwareengineer\_99](https://www.ruby-forum.com/u/softwareengineer_99)\
**Post date:** [January 29, 2006, 3:44am UTC](https://www.ruby-forum.com/t/why-am-i-getting-undefined-local-variable-or-method-acts-a/53208/2 "2006-01-29T03:44:02Z")

</div>

Ok guys it was really silly. I got it figured out.

Just remember whenever you modify your environment.rb file, remember  
to restart the web server.

Long day for me.

Frank

softwareengineer 99 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote: Hello,

I recently installed acts\_as\_taggable using the following command:

gem install acts\_as\_taggable

# output follows

Attempting local installation of ‘acts\_as\_taggable’  
Local gem file not found: acts\_as\_taggable\*.gem  
Attempting remote installation of ‘acts\_as\_taggable’  
Updating Gem source index for: [http://gems.rubyforge.org](http://gems.rubyforge.org)  
Successfully installed acts\_as\_taggable-1.0.4  
Installing RDoc documentation for acts\_as\_taggable-1.0.4…  
And added the following line to environment.rb  
require\_gem “acts\_as\_taggable-1.0.4”

However when I add the following to my target class (resource.rb):  
acts\_as\_taggable

I get the following error

undefined local variable or method `acts\_as\_taggable’ for Resource:Class

Why am I getting this error and how can I fix it? My installation seemed  
to have gone OK so what am I missing here?

I have been searching everywhere and a  
ny  
pointers are greatly appreciated.

Thanks  
Frank

* * *

What are the most popular cars? Find out at Yahoo! Autos

* * *

Rails mailing list  
removed\_email\_address@domain.invalid  
[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)
