Forum: Ruby on Rails require "ajax_scaffold" in model error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6127298119eaba07c3867e83799a8e6c?d=identicon&s=25 Lachlan Deck (Guest)
on 2006-05-03 19:11
(Received via mailing list)
Hi there,

I've got installed ajax_scaffold_generator (3.1.2, 2.2.1)

Anyway I'm following the example here <http://height1percent.com/
articles/2006/04/18/ajaxscaffold-3-1-0-released> which suggests the
following in a model file:
--------------------------------------------------------
require 'ajax_scaffold'
class Pet < ActiveRecord::Base

   belongs_to :person, :foreign_key => "owner_id"

   @scaffold_columns = [
       AjaxScaffold::ScaffoldColumn.new(self, { :name => "name" }),
       AjaxScaffold::ScaffoldColumn.new(self, { :name => "owner",
         :eval => "pet.person.name", :sort_sql => "people.name" })
     ]

end
--------------------------------------------------------

However, I'm getting the following error when loading it in a browser...

MissingSourceFile in PetsController#list
	no such file to load -- ajax_scaffold
<...>

Any ideas on where this ajax_scaffold ought to be found and why it's
not finding it?

Thanks.

with regards,
--

Lachlan Deck
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (Guest)
on 2006-08-03 14:22
(Received via mailing list)
Hey Lachlan, if you don't need 2.2.1 of this gem installed, I would
recommend doing the following:

gem cleanup

Now, when you perform a 'gem list' at the command line, you should see
the following for ajax_scaffold_generator:

ajax_scaffold_generator (3.2.1)

This should resolve the issue that you're seeing.

-Conrad
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (Guest)
on 2006-08-03 14:22
(Received via mailing list)
Hey Lachlan, you may need to rerun the ajax_scaffold_generator to make
sure that you're starting off clean.

-Conrad
6127298119eaba07c3867e83799a8e6c?d=identicon&s=25 Lachlan Deck (Guest)
on 2006-08-03 14:22
(Received via mailing list)
Hi there,

On 01/05/2006, at 5:59 AM, Conrad Taylor wrote:

> This should resolve the issue that you're seeing.
Thanks Conrad. That was it.

with regards,
--

Lachlan Deck
This topic is locked and can not be replied to.