# Why can't I migrate the rforum db?

**URL:** <https://www.ruby-forum.com/t/why-cant-i-migrate-the-rforum-db/73036>\
**Category:** Ruby-Forum\
**Created:** [February 24, 2006, 10:07pm UTC](https://www.ruby-forum.com/t/why-cant-i-migrate-the-rforum-db/73036 "2006-02-24T22:07:14Z")\
**Posts on this page:** 7\
**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:** [February 24, 2006, 10:07pm UTC](https://www.ruby-forum.com/t/why-cant-i-migrate-the-rforum-db/73036/1 "2006-02-24T22:07:14Z")

</div>

Welcome to the MySQL monitor. Commands end with ; or \g.  
Your MySQL connection id is 7 to server version: 4.1.16-standard

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql\> create database rforum\_dev;  
Query OK, 1 row affected (0.01 sec)

mysql\> create database rforum\_test;  
Query OK, 1 row affected (0.00 sec)

mysql\> create database rforum;  
Query OK, 1 row affected (0.00 sec)

mysql\> grant all on rforum\_dev.\* to ‘intention’@‘localhost’;  
Query OK, 0 rows affected (0.05 sec)

mysql\> grant all on rforum\_test.\* to ‘intention’@‘localhost’;  
Query OK, 0 rows affected (0.00 sec)

mysql\> grant all on rforum.\* to ‘intention’@‘localhost’;  
Query OK, 0 rows affected (0.00 sec)

mysql\> quit  
Bye  
65-182-44-226:~/work/rachet\_working/rforum/trunk intention$ rake migrate  
(in /Users/intention/work/rachet\_working/rforum/trunk)  
rake aborted!  
parse error on line 22, col 0: `development:' /Users/intention/work/rachet_working/rforum/trunk/rakefile.rb:9 (See full trace by running task with --trace) 65-182-44-226:~/work/rachet_working/rforum/trunk intention$ rake migrate --trace (in /Users/intention/work/rachet_working/rforum/trunk) rake aborted! parse error on line 22, col 0:`development:’  
/usr/lib/ruby/1.8/yaml.rb:119:in `load' /usr/lib/ruby/1.8/yaml.rb:119:in`load’  
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:424:in  
`database_configuration' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:168:in`initialize\_database’  
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:83:in  
`process' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:42:in`send’  
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:42:in `run' /Users/intention/work/rachet_working/rforum/trunk/config/environment.rb:10 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require\_\_’  
/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in `require' /Users/intention/work/rachet_working/rforum/trunk/rakefile.rb:9 /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1641:in`load’  
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1641:in  
`load_rakefile' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1713:in`run’  
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/bin/rake:7  
/usr/bin/rake:18:in `load’  
/usr/bin/rake:18

---

<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:** [February 24, 2006, 10:32pm UTC](https://www.ruby-forum.com/t/why-cant-i-migrate-the-rforum-db/73036/2 "2006-02-24T22:32:03Z")

</div>

Bryan W. wrote:

> parse error on line 22, col 0: `development:’

Make sure you don’t have any spaces in the “development:”,  
“production:”, “test:” lines, and that the other lines are indented with  
2 spaces each.

---

<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:** [February 25, 2006, 2:05am UTC](https://www.ruby-forum.com/t/why-cant-i-migrate-the-rforum-db/73036/3 "2006-02-25T02:05:48Z")

</div>

I’m trying to setup rforum locally.  
I created the db’s in mysql, set database.yml  
When I attempted `rake migrate` I got the following error:

parse error on line 22, col 0: `development:’

I checked database.yml for tabs and did not see any.

Here is the text of the database.yml file.

* * *

# 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: rforum  
username: rforum  
password:

# Uncomment this section for PostgreSQL:

# production:

# adapter: postgresql

# host: localhost

# database: rforum

# username: rforum

# password: pass

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

development:  
adapter: mysql  
host: localhost  
database: rforum\_dev  
username: rforum\_dev  
password:

test:  
adapter: mysql  
host: localhost  
database: rforum\_test  
username: rforum\_test  
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:** [March 1, 2006, 2:40pm UTC](https://www.ruby-forum.com/t/why-cant-i-migrate-the-rforum-db/73036/4 "2006-03-01T14:40:51Z")

</div>

Bryan W. wrote:

> I’m trying to setup rforum locally.  
> I created the db’s in mysql, set database.yml  
> When I attempted `rake migrate` I got the following error:
> 
> parse error on line 22, col 0: `development:’

Please take a look at [Need help in setting this thing up - Ruby-Forum - Ruby-Forum](http://www.ruby-forum.com/topic/12#39077).

---

<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:** [March 1, 2006, 9:56pm UTC](https://www.ruby-forum.com/t/why-cant-i-migrate-the-rforum-db/73036/5 "2006-03-01T21:56:40Z")

</div>

Bryan W. wrote:

> I have checked and rechecked database.yml and there are no tabs.
> 
> I fully reinstalled Ruby and Rails yesterday.
> 
> I attempted to
> 
> $ rake migrate --trace  
> (in /Users/intention/work/rachet\_working/rforum/trunk)  
> rake aborted!  
> syntax error on line 59, col 0: `registration\_email\_sent:  
> ?Ñ·???Email??%s’

Please delete all lang/\* files that you don’t need, it should work then.  
I’m not sure why you are getting this error, but I think there is a YAML  
bug in a certain Ruby Version (1.8.3?).

---

<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:** [March 1, 2006, 6:01pm UTC](https://www.ruby-forum.com/t/why-cant-i-migrate-the-rforum-db/73036/6 "2006-03-01T18:01:59Z")

</div>

I have checked and rechecked database.yml and there are no tabs.

I fully reinstalled Ruby and Rails yesterday.

I attempted to

$ rake migrate --trace  
(in /Users/intention/work/rachet\_working/rforum/trunk)  
rake aborted!  
syntax error on line 59, col 0: `registration_email_sent: ?Ñ·???Email??%s' /usr/local/lib/ruby/1.8/yaml.rb:133:in`load’  
/usr/local/lib/ruby/1.8/yaml.rb:133:in `load' /Users/intention/work/rachet_working/rforum/trunk/lib/localization.rb:44:in`load\_localized\_strings’  
/Users/intention/work/rachet\_working/rforum/trunk/lib/localization.rb:42:in  
`load_localized_strings' /Users/intention/work/rachet_working/rforum/trunk/config/app.rb:20 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:214:in  
`require' /Users/intention/work/rachet_working/rforum/trunk/config/environment.rb:52 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require’  
/Users/intention/work/rachet\_working/rforum/trunk/rakefile.rb:9  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1641:in  
`load_rakefile' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1713:in`run’  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/bin/rake:7  
/usr/local/bin/rake:18

* * *

I found 2 references to the snippet ( registration\_email\_sent: ) in  
rforum:  
lang/en.yaml line 63  
lang/ro.yaml line 56

There are no tabs in either 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:** [April 3, 2006, 6:16am UTC](https://www.ruby-forum.com/t/why-cant-i-migrate-the-rforum-db/73036/7 "2006-04-03T06:16:23Z")

</div>

Andreas S. wrote:

> Bryan W. wrote:
> 
> > rake aborted!  
> > syntax error on line 59, col 0: `registration\_email\_sent:  
> > ?Ñ·???Email??%s’
> 
> Please delete all lang/\* files that you don’t need, it should work then.  
> I’m not sure why you are getting this error, but I think there is a YAML  
> bug in a certain Ruby Version (1.8.3?).

I get the exact same problem with top-of-tree (though not with 0.2).  
It’s the localization file cn.yaml: I assume Ruby isn’t interpreting the  
text encoding correctly (the file does say “file\_charset: GB18030” at  
the top.)

I’m running Ruby 1.8.4 and Rails 1.1 on Mac OS X 10.4.6. Is it possible  
that the encodings supported by Ruby are platform-dependent? Maybe OS X  
doesn’t include support for this encoding. Converting the file to UTF-8  
would be a good solution.

As a workaround I’ll just delete the file from my working set…

–Jens
