refactor rails detection and command selection
version bump 0.4.0