# Error when following Agile Web Development in RoR

**URL:** <https://www.ruby-forum.com/t/error-when-following-agile-web-development-in-ror/122581>\
**Category:** Rails\
**Created:** [December 9, 2007, 8:43pm UTC](https://www.ruby-forum.com/t/error-when-following-agile-web-development-in-ror/122581 "2007-12-09T20:43:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_white](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/54ee81/32.png) [@jason\_white](https://www.ruby-forum.com/u/jason_white)\
**Post date:** [December 9, 2007, 8:43pm UTC](https://www.ruby-forum.com/t/error-when-following-agile-web-development-in-ror/122581/1 "2007-12-09T20:43:21Z")

</div>

I was originally using instant rails, and decided to try installing  
ruby,  
rails, and mysql on my own. No problem with the install. I used gem  
install  
rails --include-dependencies, and got no errors. The problem seems to be  
with defining the scaffold method. I had no problems with this in  
Instant  
Rails, and i’m guessing this has something to do with Rails 2.0. Would  
the  
RoR gurus please lend a hand, and guide me to the light?

thanks,

Jason

NoMethodError in AdminController#index  
undefined method `scaffold’ for AdminController:Class

RAILS\_ROOT: /Users/jason/rails/depot  
_Application Trace_ [http://localhost:3000/admin#](http://localhost:3000/admin#) | _Framework  
Trace_[http://localhost:3000/admin#](http://localhost:3000/admin#)  
| _Full Trace_ [http://localhost:3000/admin#](http://localhost:3000/admin#)  
app/controllers/admin\_controller.rb:2

---

<div class="post-metadata">

**Author:** ![jason\_white](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/54ee81/32.png) [@jason\_white](https://www.ruby-forum.com/u/jason_white)\
**Post date:** [December 9, 2007, 8:49pm UTC](https://www.ruby-forum.com/t/error-when-following-agile-web-development-in-ror/122581/2 "2007-12-09T20:49:46Z")

</div>

If I’m not mistaken, the issue you’re having is due to the fact that  
scaffolding has been deprecated as of Rails 2.0. If that’s the case,  
it might be a bit hard for a Rails newbie to follow along with AWDwR.

I’m pretty n00b-ish myself, so am I totally wrong about this? If I’m  
not, does anyone out there have any suggestions for alternative  
tutorials that don’t presuppose scaffolding?

---

<div class="post-metadata">

**Author:** ![jason\_white](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/54ee81/32.png) [@jason\_white](https://www.ruby-forum.com/u/jason_white)\
**Post date:** [December 10, 2007, 4:27pm UTC](https://www.ruby-forum.com/t/error-when-following-agile-web-development-in-ror/122581/3 "2007-12-10T16:27:10Z")

</div>

On 12/9/07, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> If I’m not mistaken, the issue you’re having is due to the fact that  
> scaffolding has been deprecated as of Rails 2.0. If that’s the case,  
> it might be a bit hard for a Rails newbie to follow along with AWDwR.
> 
> I’m pretty n00b-ish myself, so am I totally wrong about this? If I’m  
> not, does anyone out there have any suggestions for alternative  
> tutorials that don’t presuppose scaffolding?

I’m not sure deprecated is the right term, it (dynamic scaffolding as  
opposed to generated scaffolds) has been moved out of the core and  
into a plugin in Rails 2.0. Another thing which has been moved out of  
core are db adapters for commercial databases like Oracle, and SQL  
server, these are now separate gems.

For the most part Rails 2.0 is pretty compatible with 1.2.x, however,  
it’s probably different enough to trip up n00bs working through things  
like AWDWR 2nd ed. I don’t know that there’s a really good in-depth  
beginners tutorial on Rails 2.0 yet. I’d probably advise folks  
starting out with Rails right now to install rails 1.2.x and use that  
while following AWDWR.

If someone wants to persist in using AWDWR with Rails 2.0, one hint is  
to check the plugin repository at  
[http://svn.rubyonrails.org/rails/plugins/](http://svn.rubyonrails.org/rails/plugins/) if you run into a missing  
function like this.

The new book “The Rails Way” looks like a very good resource on Rails  
2.0 for those with some rails experience under their belt, but it’s  
really not structured as a beginner’s book.

–  
Rick DeNatale

My blog on Ruby  
[http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)

---

<div class="post-metadata">

**Author:** ![jason\_white](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/54ee81/32.png) [@jason\_white](https://www.ruby-forum.com/u/jason_white)\
**Post date:** [December 27, 2007, 3:30am UTC](https://www.ruby-forum.com/t/error-when-following-agile-web-development-in-ror/122581/4 "2007-12-27T03:30:41Z")

</div>

I got the AWDWR 2nd ed for Xmas. I just ran into the “undefined method  
`scaffold’ for AdminController:Class” error working on my “depoot”  
example. I am running on OS X and installed Rails 2.0.2. Someone  
suggested I use Rails 1.2. How do I back out 2.0 and go back to 1.2? I  
installed it as a “package” on OS X. It installed in /usr/local/bin.  
Do I just delete it? Can rails stand alone, or do I need all the  
other stuff? Maybe the scaffold plug in is easier. Can someone explain  
in detail how to add that plug in?

I’m a java developer w/Unix experience, so I’m not totally clueless,  
but I am very new to Rails and Ruby.

Thanks!

---

<div class="post-metadata">

**Author:** ![jason\_white](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/54ee81/32.png) [@jason\_white](https://www.ruby-forum.com/u/jason_white)\
**Post date:** [December 27, 2007, 6:34am UTC](https://www.ruby-forum.com/t/error-when-following-agile-web-development-in-ror/122581/5 "2007-12-27T06:34:18Z")

</div>

Search for rails freeze command, use it to go back to version 1.2.6

Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![jason\_white](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/54ee81/32.png) [@jason\_white](https://www.ruby-forum.com/u/jason_white)\
**Post date:** [December 27, 2007, 6:36am UTC](https://www.ruby-forum.com/t/error-when-following-agile-web-development-in-ror/122581/6 "2007-12-27T06:36:04Z")

</div>

Or just gem install rails -v=1.2.6 then specify RAILS\_GEM\_VERSION in  
your  
config/environment.rb.

On Dec 27, 2007 4:03 PM, Bcp [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > example. I am running on OS X and installed Rails 2.0.2. Someone
> > 
> > >
> 
> >

–  
Ryan B.

> **[frozenplague.net](http://www.frozenplague.net)**
>
> This domain may be for sale!

Feel free to add me to MSN and/or GTalk as this email.

---

<div class="post-metadata">

**Author:** ![jason\_white](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/54ee81/32.png) [@jason\_white](https://www.ruby-forum.com/u/jason_white)\
**Post date:** [December 27, 2007, 6:44am UTC](https://www.ruby-forum.com/t/error-when-following-agile-web-development-in-ror/122581/7 "2007-12-27T06:44:14Z")

</div>

On Dec 26, 2007, at 8:30 PM, alfredojahn wrote:

> I’m a java developer w/Unix experience, so I’m not totally clueless,  
> but I am very new to Rails and Ruby.

The easiest way by far is to just download Locomotive. It’s self-  
contained, and is removed simply by dragging its folder to the trash.  
You’ll be up and running in about two minutes after your download  
completes.

For even extra easiness, download MAMP as well, and have a self-  
contained MySQL install as well.

---

<div class="post-metadata">

**Author:** ![jason\_white](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/54ee81/32.png) [@jason\_white](https://www.ruby-forum.com/u/jason_white)\
**Post date:** [January 1, 2008, 9:22pm UTC](https://www.ruby-forum.com/t/error-when-following-agile-web-development-in-ror/122581/8 "2008-01-01T21:22:48Z")

</div>

Jason, I’ve found the same trouble installing ruby on rails on Windows.  
I’ve tried to install the ruby plugin but failed. You need to do a few  
little changes from the original [rubyonrails.org](http://rubyonrails.org) website. Here is the  
installation I did:

1. install ruby from [Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.](http://www.rubyonrails.org/down).
2. Because ruby changes your path settings, open a NEW command prompt  
and  
install gems like is told on the [Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.](http://www.rubyonrails.org/down) website. In  
the  
new command prompt type “ruby setup.rb”.
3. Install the correct rails with the scaffolding. If you already  
installed the  
latest rails 2.x then uninstall it with “gem uninstall rails”. Then  
do the  
rails install with version 1.2.6. Type  
“gem install rails --version 1.2.6 --include-dependencies”
4. Looking at all the different directories, rails creates, I need the  
projec  
manager. After trying out several I found “Intype” which is very  
small and  
just do the needful in a nice view. Its still in beta and therefore  
its  
still free. Download from:  
“[イソフラボンでシミ対策](http://intype.info/home/index.php)”. You can download both the editor  
and  
the project manager (I’ve used rarzilla for the rar file).
5. Download and install the freeware package of MySQL. I’m using the  
essentials  
package. You need to register though.
6. Create your work direcory (I’m using c:\webserver\test). If you want  
to  
follow the “Hello” example from the Agile book then type:  
“rails Hello”  
cd into the “Hello” directory.  
Open the webserver with “ruby script/server”.  
Open the webpage with “[http://localhost:3000](http://localhost:3000)” and check the  
“about your application’s environment” for the installed versions  
etcetera.

Wish you good luck
