# Scaffold.. random error

**URL:** <https://www.ruby-forum.com/t/scaffold-random-error/169910>\
**Category:** Rails\
**Created:** [June 10, 2009, 6:56am UTC](https://www.ruby-forum.com/t/scaffold-random-error/169910 "2009-06-10T06:56:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 10, 2009, 6:56am UTC](https://www.ruby-forum.com/t/scaffold-random-error/169910/1 "2009-06-10T06:56:50Z")

</div>

Did this:

script/generate scaffold file name:string description:text  
file\_url:string online\_status:boolean position:integer

Plus:  
rake db:migrate

And the model gives me an error. It can’t call any functions like,  
Text.all, Text.new etc.  
I get:  
“undefined method `all’ for Text:Module”

I’ve done this a bunch of times before, no idea what the deal is.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 10, 2009, 8:46am UTC](https://www.ruby-forum.com/t/scaffold-random-error/169910/2 "2009-06-10T08:46:34Z")

</div>

> script/generate scaffold file name:string description:text  
> file\_url:string online\_status:boolean position:integer

Change the name from file to some other It is reserved

Sijo
