Forum: Ruby-Forum.com Step 4 in README

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
91c825f8b4f88257f3439d0e73cf1130?d=identicon&s=25 Bryan W. (railsroad)
on 2006-01-09 21:29
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
3a83969376c805ef5b6042191fdb0ff3?d=identicon&s=25 Andreas S. (andreas)
on 2006-01-09 21:49
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.
91c825f8b4f88257f3439d0e73cf1130?d=identicon&s=25 Bryan W. (railsroad)
on 2006-01-09 22:23
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 :)
3a83969376c805ef5b6042191fdb0ff3?d=identicon&s=25 Andreas S. (andreas)
on 2006-01-10 00:25
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?
91c825f8b4f88257f3439d0e73cf1130?d=identicon&s=25 Bryan W. (railsroad)
on 2006-01-10 17:06
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
3a83969376c805ef5b6042191fdb0ff3?d=identicon&s=25 Andreas S. (andreas)
on 2006-01-10 17:23
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: ********
This topic is locked and can not be replied to.