Update gemspec; only register template handler if Rails defined