Fixed ". is not a rails project." error on all running of a rails generator or spree installer

Fixes #3235