Changed the point of loading rails to fix problems with rails requiring bundler.