# Require "ajax\_scaffold" in model error

**URL:** <https://www.ruby-forum.com/t/require-ajax-scaffold-in-model-error/59507>\
**Category:** Rails\
**Created:** [May 3, 2006, 7:11pm UTC](https://www.ruby-forum.com/t/require-ajax-scaffold-in-model-error/59507 "2006-05-03T19:11:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lachlan\_Deck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a9adbd/32.png) [@Lachlan\_Deck](https://www.ruby-forum.com/u/Lachlan_Deck)\
**Post date:** [May 3, 2006, 7:11pm UTC](https://www.ruby-forum.com/t/require-ajax-scaffold-in-model-error/59507/1 "2006-05-03T19:11:02Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![Lachlan\_Deck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a9adbd/32.png) [@Lachlan\_Deck](https://www.ruby-forum.com/u/Lachlan_Deck)\
**Post date:** [August 3, 2006, 2:22pm UTC](https://www.ruby-forum.com/t/require-ajax-scaffold-in-model-error/59507/2 "2006-08-03T14:22:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Lachlan\_Deck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a9adbd/32.png) [@Lachlan\_Deck](https://www.ruby-forum.com/u/Lachlan_Deck)\
**Post date:** [August 3, 2006, 2:22pm UTC](https://www.ruby-forum.com/t/require-ajax-scaffold-in-model-error/59507/3 "2006-08-03T14:22:54Z")

</div>

Hey Lachlan, you may need to rerun the ajax\_scaffold\_generator to make  
sure that you’re starting off clean.

-Conrad

---

<div class="post-metadata">

**Author:** ![Lachlan\_Deck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a9adbd/32.png) [@Lachlan\_Deck](https://www.ruby-forum.com/u/Lachlan_Deck)\
**Post date:** [August 3, 2006, 2:22pm UTC](https://www.ruby-forum.com/t/require-ajax-scaffold-in-model-error/59507/4 "2006-08-03T14:22:55Z")

</div>

Hi there,

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

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

## with regards,

Lachlan Deck
