Undefined local variable or method "acts_as_list"?

#1

Hi, I’m getting the error below, and I’m not sure where to find
“acts_as_list” …

NameError in SpecialsController#printer
undefined local variable or method `acts_as_list’ for #<Class:
0xb7a46994>

RAILS_ROOT: /usr/local/apache2/htdocs/dps
Application Trace | Framework Trace | Full Trace

vendor/plugins/trunk/lib/scope_out.rb:70:in method_missing' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ base.rb:1532:inmethod_missing’
app/models/toner_special.rb:4
app/controllers/specials_controller.rb:6

Here’s the code that’s causing the problem from the app/controllers/
specials_controller.rb file:

TonerSpecial.content_columns.each do |column| # line 6
in_place_edit_for :toner_special, column.name
end

Any insights are greatly appreciated, - Dave

#2

On 22 Feb 2008, at 15:50, removed_email_address@domain.invalid wrote:

Hi, I’m getting the error below, and I’m not sure where to find
“acts_as_list” …

NameError in SpecialsController#printer
undefined local variable or method `acts_as_list’ for #<Class:
0xb7a46994>

Do you have the acts_as_list plugin
(http://dev.rubyonrails.org/browser/plugins
) ?

Fred

#3

Frederick C. wrote:

On 22 Feb 2008, at 15:50, removed_email_address@domain.invalid wrote:

Hi, I’m getting the error below, and I’m not sure where to find
“acts_as_list” …

NameError in SpecialsController#printer
undefined local variable or method `acts_as_list’ for #<Class:
0xb7a46994>

Do you have the acts_as_list plugin
(http://dev.rubyonrails.org/browser/plugins
) ?

Fred

Ditto here.
Forgive the ignorance here…

I’m assuming ‘acts_as_list’ is NOT a part of the core Rails (2.0.2); but
a plugin.
What is the standard/typical way to install such plugin?
…or could I just say: $>sudo gem install acts_as_list?

Ric.

#4

Frederick L. wrote:

Frederick C. wrote:

On 22 Feb 2008, at 15:50, removed_email_address@domain.invalid wrote:

Hi, I’m getting the error below, and I’m not sure where to find
“acts_as_list” …

NameError in SpecialsController#printer
undefined local variable or method `acts_as_list’ for #<Class:
0xb7a46994>

Do you have the acts_as_list plugin
(http://dev.rubyonrails.org/browser/plugins
) ?

Fred

Ditto here.
Forgive the ignorance here…

I’m assuming ‘acts_as_list’ is NOT a part of the core Rails (2.0.2); but
a plugin.
What is the standard/typical way to install such plugin?
…or could I just say: $>sudo gem install acts_as_list?

Ric.

I noticed the ‘Acts_As_List’ is part of Rails 1.26 documentation (re:
http://railsbrain.com) but is NOT listed in Rails 2.0.2 documentation.

Is ‘acts_as_list’ deprecated?

Also, is there a way within Rails to passively check for an existence of
a library object such as ‘acts_as_list’ without having an exception
blown?

Ric.

#5

script/plugin install acts_as_list

On Feb 25, 6:50 pm, Frederick L. removed_email_address@domain.invalid

#6

Don’t think there is a way to check, but you could run a rake test and
that would tell you (if you have been writing tests all along!)

On Feb 25, 6:50 pm, Frederick L. removed_email_address@domain.invalid

#7

On 25 Feb 2008, at 18:50, Frederick L. wrote:

blown?

rescue the exception ?

Fred

#8

Here’s the news on “acts_as_xxx” from
http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial-part-2

“The acts_as plugins are now optional and you can still have them.
They are all here: http://svn.rubyonrails.org/rails/plugins/

For plugin installation, you can usually do the following from your
application root:

ruby script/plugin install acts_as_list

…and the magic happens. I’m not sure how to get acts_as_list, but
if the above command doesn’t do it for you, you might be able to refer
to it with the full path to the web resource (i.e., ruby script/plugin
install http://svn.rubyonrails.org/rails/plugins/acts_as_list/). It’s
worth a shot.

As far as deprecation goes, ‘acts_as_list’ has been removed from the
core in favor of a ‘plugin-ized’ version. Call it what you will.

-Kyle

On Feb 26, 4:38 am, Frederick C. removed_email_address@domain.invalid