# Rake db:migrate throws unexpected error

**URL:** <https://www.ruby-forum.com/t/rake-db-migrate-throws-unexpected-error/183852>\
**Category:** Rails\
**Created:** [February 21, 2010, 9:20pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-throws-unexpected-error/183852 "2010-02-21T21:20:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danwoods](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8baadc/32.png) [@danwoods](https://www.ruby-forum.com/u/danwoods)\
**Post date:** [February 21, 2010, 9:20pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-throws-unexpected-error/183852/1 "2010-02-21T21:20:18Z")

</div>

Working with rails for the first time and I getting a rake error when I  
try:  
rake db:migrate RAILS\_ENV=staging

The Error:  
(in [my current directory])  
rake aborted!  
undefined method `symbolize\_keys’ for nil:NilClass

## Has anyone seen this?

View this message in context:  
[http://old.nabble.com/rake-db%3Amigrate-throws-unexpected-error-tp27676889p27676889.html](http://old.nabble.com/rake-db%3Amigrate-throws-unexpected-error-tp27676889p27676889.html)  
Sent from the RubyOnRails Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![danwoods](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8baadc/32.png) [@danwoods](https://www.ruby-forum.com/u/danwoods)\
**Post date:** [February 22, 2010, 4:08pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-throws-unexpected-error/183852/2 "2010-02-22T16:08:10Z")

</div>

danwoods wrote:

> The Error:  
> (in [my current directory])  
> rake aborted!  
> undefined method `symbolize\_keys’ for nil:NilClass

Given that nil does not implement symbolize\_keys you need to know where  
you’re ending up with a nil.

Have your run your rake task with the --trace option to see if you get a  
backtrace that will show you where to look?

rake --trace db:migrate RAILS\_ENV=staging
