add mail gem
log dir
add in the environment