getting cur dir if rails not defined