# I got this error when creating data bases with rake command

**URL:** <https://www.ruby-forum.com/t/i-got-this-error-when-creating-data-bases-with-rake-command/173546>\
**Category:** Rails\
**Created:** [August 11, 2009, 7:37am UTC](https://www.ruby-forum.com/t/i-got-this-error-when-creating-data-bases-with-rake-command/173546 "2009-08-11T07:37:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajendra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@rajendra](https://www.ruby-forum.com/u/rajendra)\
**Post date:** [August 11, 2009, 7:37am UTC](https://www.ruby-forum.com/t/i-got-this-error-when-creating-data-bases-with-rake-command/173546/1 "2009-08-11T07:37:47Z")

</div>

hi i got this error when i tries to run rake db:create:all command,

G:\my\frogtest\>rake db:create:all  
(in G:/my/frogtest)  
rake aborted!  
undefined method `last’ for  
{“action\_mailer\_optional\_tls”=\>:environment}:Hash  
G:/my/frogtest/rakefile:10  
(See full trace by running task with --trace)

my rake file is like this

# Add your own tasks in files placed in lib/tasks ending in .rake,

# for example lib/tasks/capistrano.rake, and they will automatically be

available to Rake.

require(File.join(File.dirname( **FILE** ), ‘config’, ‘boot’))

require ‘rake’  
require ‘rake/testtask’  
require ‘rake/rdoctask’

require ‘tasks/rails’

can anyone tell why this it’s happening

i am using rake 0.8.7.

regards,  
rajendra

---

<div class="post-metadata">

**Author:** ![rajendra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@rajendra](https://www.ruby-forum.com/u/rajendra)\
**Post date:** [August 11, 2009, 7:44am UTC](https://www.ruby-forum.com/t/i-got-this-error-when-creating-data-bases-with-rake-command/173546/2 "2009-08-11T07:44:04Z")

</div>

rajendra

try to use =\> rake db:migrate

---

<div class="post-metadata">

**Author:** ![rajendra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@rajendra](https://www.ruby-forum.com/u/rajendra)\
**Post date:** [August 11, 2009, 7:48am UTC](https://www.ruby-forum.com/t/i-got-this-error-when-creating-data-bases-with-rake-command/173546/3 "2009-08-11T07:48:49Z")

</div>

Wap A. wrote:

> rajendra
> 
> try to use =\> rake db:migrate

that is also not working,

it gives like this

G:\my\frogtest\>rake db:migrate  
(in G:/my/frogtest)  
rake aborted!  
undefined method `last’ for  
{“action\_mailer\_optional\_tls”=\>:environment}:Hash  
G:/my/frogtest/rakefile:10  
(See full trace by running task with --trace)

---

<div class="post-metadata">

**Author:** ![rajendra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@rajendra](https://www.ruby-forum.com/u/rajendra)\
**Post date:** [August 11, 2009, 10:15am UTC](https://www.ruby-forum.com/t/i-got-this-error-when-creating-data-bases-with-rake-command/173546/4 "2009-08-11T10:15:46Z")

</div>

Can you post the full trac of the rake task?

On Aug 11, 10:48 am, Rajendra B. \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![rajendra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@rajendra](https://www.ruby-forum.com/u/rajendra)\
**Post date:** [August 11, 2009, 10:15am UTC](https://www.ruby-forum.com/t/i-got-this-error-when-creating-data-bases-with-rake-command/173546/5 "2009-08-11T10:15:46Z")

</div>

Can you post the full trace of the rake task?

On Aug 11, 10:48 am, Rajendra B. \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![rajendra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e8cbc/32.png) [@rajendra](https://www.ruby-forum.com/u/rajendra)\
**Post date:** [August 11, 2009, 2:52pm UTC](https://www.ruby-forum.com/t/i-got-this-error-when-creating-data-bases-with-rake-command/173546/6 "2009-08-11T14:52:40Z")

</div>

The most important option for debugging this kind of thing is the –  
trace option. You’ll get a lot more help if you post the complete  
output of:

rake db:create:all --trace

However, I’d also recommend that you look for the string  
‘action\_mailer\_optional\_tls’ in your source files - that’s most likely  
the source of the error.

–Matt J.

On Aug 11, 1:37 am, Rajendra B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
