# Error in executing the scaffold

**URL:** <https://www.ruby-forum.com/t/error-in-executing-the-scaffold/191070>\
**Category:** Rails\
**Created:** [July 4, 2010, 6:02am UTC](https://www.ruby-forum.com/t/error-in-executing-the-scaffold/191070 "2010-07-04T06:02:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adriano\_Dias\_da\_Sil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/9f8e36/32.png) [@Adriano\_Dias\_da\_Sil](https://www.ruby-forum.com/u/Adriano_Dias_da_Sil)\
**Post date:** [July 4, 2010, 6:02am UTC](https://www.ruby-forum.com/t/error-in-executing-the-scaffold/191070/1 "2010-07-04T06:02:55Z")

</div>

Good night.

I am starting in linux and development in Ruby.  
I have not much expertise in this area.  
I’m using ruby + rails + postgres + RadRails.

I generated a CRUD for testing as follows below:  
scaffold Teste nome:string login:string senha:string

When I run this application showing the following error:

NameError in Testes#index

Showing app/views/testes/index.html.erb where line #24 raised:

undefined local variable or method `new\_teste\_path’ for  
#ActionView::Base:0xb6f93560

Extracted source (around line #24):

21:  
22:   
  
23:  
24: \<%= link\_to ‘New teste’, new\_teste\_path %\>

RAILS\_ROOT: /home/adriano/Aptana Studio Workspace/teste  
Application Trace | Framework Trace | Full Trace

app/views/testes/index.html.erb:24  
app/controllers/testes\_controller.rb:7:in `index' -e:2:in`load’  
-e:2

Please help me solve this problem.

Thanks …

Best Regards  
Adriano Dias da Silva

---

<div class="post-metadata">

**Author:** ![Adriano\_Dias\_da\_Sil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/9f8e36/32.png) [@Adriano\_Dias\_da\_Sil](https://www.ruby-forum.com/u/Adriano_Dias_da_Sil)\
**Post date:** [July 4, 2010, 2:52pm UTC](https://www.ruby-forum.com/t/error-in-executing-the-scaffold/191070/2 "2010-07-04T14:52:32Z")

</div>

Did you run ‘rake db:migrate’ after you created the new scaffold?  
Also, if you did not do it yet, you will also have to run ‘rake  
db:create’ to create the db before you run the migration.

On 7/4/10, Adriano Dias da Silva [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 22:
> 
> To post to this group, send email to removed\_email\_address@domain.invalid.  
> To unsubscribe from this group, send email to  
> removed\_email\_address@domain.invalid.  
> For more options, visit this group at  
> [http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

–  
Sent from my mobile device

---

<div class="post-metadata">

**Author:** ![Adriano\_Dias\_da\_Sil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/9f8e36/32.png) [@Adriano\_Dias\_da\_Sil](https://www.ruby-forum.com/u/Adriano_Dias_da_Sil)\
**Post date:** [July 4, 2010, 8:40pm UTC](https://www.ruby-forum.com/t/error-in-executing-the-scaffold/191070/3 "2010-07-04T20:40:50Z")

</div>

Thank you…

The error was happening only when I created the scaffold/migrate for  
RadRails.  
So I created the first scaffold/migrate through the terminal and the  
other by RadRails and it worked.

Best Regards…  
Adriano Dias da Silva

---

<div class="post-metadata">

**Author:** ![Adriano\_Dias\_da\_Sil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/9f8e36/32.png) [@Adriano\_Dias\_da\_Sil](https://www.ruby-forum.com/u/Adriano_Dias_da_Sil)\
**Post date:** [July 4, 2010, 8:54pm UTC](https://www.ruby-forum.com/t/error-in-executing-the-scaffold/191070/4 "2010-07-04T20:54:17Z")

</div>

Resolved…
