# Issue with scaffolding with rails 2.2 and mySQL

**URL:** <https://www.ruby-forum.com/t/issue-with-scaffolding-with-rails-2-2-and-mysql/155557>\
**Category:** Rails\
**Created:** [December 13, 2008, 12:30pm UTC](https://www.ruby-forum.com/t/issue-with-scaffolding-with-rails-2-2-and-mysql/155557 "2008-12-13T12:30:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/53a042/32.png) [@mikari](https://www.ruby-forum.com/u/mikari)\
**Post date:** [December 13, 2008, 12:30pm UTC](https://www.ruby-forum.com/t/issue-with-scaffolding-with-rails-2-2-and-mysql/155557/1 "2008-12-13T12:30:52Z")

</div>

Hi guys,  
I’m having problems when creating basic web applications using rails  
2.2 and mySQL databases.  
If I create the following table in a database named  
moviecritc\_development:

CREATE TABLE movies (  
id INT NOT NULL AUTO\_INCREMENT PRIMARY\_KEY,  
name VARCHAR(30) NOT NULL );

and then run the following ruby commands:

gem install rails  
gem install mysql  
rails -d mysql moviecritic (creates all the necessary files without any  
issue.)

I then modify the config/database.yml to include the root password to  
my database.

About your applicationâ€™s environment  
Ruby version 1.8.6 (i386-mswin32)  
RubyGems version 1.3.1  
Rails version 2.2.2  
Active Record version 2.2.2  
Action Pack version 2.2.2  
Active Resource version 2.2.2  
Action Mailer version 2.2.2  
Active Support version 2.2.2  
Application root C:/Documents and Settings/Stephen/moviecritic  
Environment development  
Database adapter mysql  
Database schema version 0

I then run the following command:  
ruby script/generate scaffold Movie (creates usual files without error).

If i now view the db/migrate.create\_movies.rb i see the following:  
class CreateMovies \< ActiveRecord::Migration  
def self.up  
create\_table :movies do |t|

```
 t.timestamps

```

end  
end

def self.down  
drop\_table :movies  
end  
end

It doesn’t make a reference to the name column i created! This is  
reflected when i navigate to localhost:3000/movies/new i only see a  
Back link and a Create Button, i don’t see a NAME FIELD INPUT.

Has anyone any ideas why this is happening?  
Thanks in advance,  
Stephen
