use bundle exec for rails so the correct rails version is used.

Fixes #3909