fix db check, but its ugly...
use variable for rails env