# Step 4 in README

**URL:** <https://www.ruby-forum.com/t/step-4-in-readme/51977>\
**Category:** Ruby-Forum\
**Created:** [January 9, 2006, 9:29pm UTC](https://www.ruby-forum.com/t/step-4-in-readme/51977 "2006-01-09T21:29:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![railsroad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e274bd/32.png) [@railsroad](https://www.ruby-forum.com/u/railsroad)\
**Post date:** [January 9, 2006, 9:29pm UTC](https://www.ruby-forum.com/t/step-4-in-readme/51977/1 "2006-01-09T21:29:09Z")

</div>

I’m trying to setup Rforum for the 1st time and I’m confused by step 4:

Setup the database tables:  
RAILS\_ENV=production rake migrate

I’ve completed the tutorial in the Agile Rails book, but I have no idea  
what this step actually is. My guess is that this line needs to be  
added to one of the files in Rforum.

All the examples I’ve seen have created the tables from a db schema  
files ( i.e. create.sql )

I was just hoping that someone might be able to help point me in the  
right direction.

thanks,  
RailsRoad

---

<div class="post-metadata">

**Author:** ![railsroad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e274bd/32.png) [@railsroad](https://www.ruby-forum.com/u/railsroad)\
**Post date:** [January 9, 2006, 9:49pm UTC](https://www.ruby-forum.com/t/step-4-in-readme/51977/2 "2006-01-09T21:49:09Z")

</div>

Bryan Wheelock wrote:

> I’m trying to setup Rforum for the 1st time and I’m confused by step 4:
> 
> Setup the database tables:  
> RAILS\_ENV=production rake migrate
> 
> I’ve completed the tutorial in the Agile Rails book, but I have no idea  
> what this step actually is. My guess is that this line needs to be  
> added to one of the files in Rforum.

Enter this on the command line.

> All the examples I’ve seen have created the tables from a db schema  
> files ( i.e. create.sql )

RForum is using Rails migrations to create the database.

---

<div class="post-metadata">

**Author:** ![railsroad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e274bd/32.png) [@railsroad](https://www.ruby-forum.com/u/railsroad)\
**Post date:** [January 9, 2006, 10:23pm UTC](https://www.ruby-forum.com/t/step-4-in-readme/51977/3 "2006-01-09T22:23:19Z")

</div>

Hmmm,  
When I ran this command:

RAILS\_ENV=production rake migrate

I received the following error:  
syntax error on line 9, col 2: ` database: rforum’

I looked at the rakefile.rb line 9:  
require File.dirname( **FILE** ) + ‘/config/environment’

Which looks to me like it’s requiring environment.rb  
However, when I looked at that file, it wasn’t clear what may be causing  
the error. I did see line 5:

# Uncomment below to force Rails into production mode

# (Use only when you can’t set environment variables through your

web/app server)

# ENV[‘RAILS\_ENV’] = ‘production’

I didn’t think it would be appropriate to uncomment this.

confused,  
RailsRoad - aka the Real Newbie 🙂

---

<div class="post-metadata">

**Author:** ![railsroad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e274bd/32.png) [@railsroad](https://www.ruby-forum.com/u/railsroad)\
**Post date:** [January 10, 2006, 12:25am UTC](https://www.ruby-forum.com/t/step-4-in-readme/51977/4 "2006-01-10T00:25:24Z")

</div>

Bryan Wheelock wrote:

> Hmmm,  
> When I ran this command:
> 
> RAILS\_ENV=production rake migrate
> 
> I received the following error:  
> syntax error on line 9, col 2: ` database: rforum’

This seems to mean an error in the database.yaml file. If you made  
changes to it, could you post the whole content of the file?

---

<div class="post-metadata">

**Author:** ![railsroad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e274bd/32.png) [@railsroad](https://www.ruby-forum.com/u/railsroad)\
**Post date:** [January 10, 2006, 5:23pm UTC](https://www.ruby-forum.com/t/step-4-in-readme/51977/5 "2006-01-10T17:23:24Z")

</div>

Bryan Wheelock wrote:

> Thanks for the Support
> 
> # SQLite is enabled by default. Remember to change the dbfile path.
> 
> #production:
> 
> # adapter: sqlite
> 
> # dbfile: /tmp/rforum\_prod.db
> 
> # Uncomment this section for MySQL:
> 
> production:  
> adapter: mysql  
> host: localhost  
> database: spiritua\_rforum  
> username: spiritua\_rforum  
> password: \*\*\*\*\*\*\*\*

Indentation matters:

production:  
adapter: mysql  
host: localhost  
database: spiritua\_rforum  
username: spiritua\_rforum  
password: \*\*\*\*\*\*\*\*

---

<div class="post-metadata">

**Author:** ![railsroad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e274bd/32.png) [@railsroad](https://www.ruby-forum.com/u/railsroad)\
**Post date:** [January 10, 2006, 5:06pm UTC](https://www.ruby-forum.com/t/step-4-in-readme/51977/6 "2006-01-10T17:06:37Z")

</div>

Thanks for the Support

# SQLite is enabled by default. Remember to change the dbfile path.

#production:

# adapter: sqlite

# dbfile: /tmp/rforum\_prod.db

# Uncomment this section for MySQL:

production:  
adapter: mysql  
host: localhost  
database: spiritua\_rforum  
username: spiritua\_rforum  
password: \*\*\*\*\*\*\*\*

# Uncomment this section for PostgreSQL:

# production:

# adapter: postgresql

# host: localhost

# database: rforum

# username: rforum

# password:

# The following settings are only used for testing and development.

development:  
adapter: sqlite  
dbfile: /tmp/rforum\_dev.db

test:  
adapter: sqlite  
dbfile: /tmp/rforum\_test.db
