问题
Without a file extension I can't get syntax highlighting to persist. That's not the end of the world, but I'd appreciate having it.
Will it break Rails if I rename Gemfile
as Gemfile.rb
?
回答1:
It looks like you can rename it, but bundler will not automatically find it.
However, you can just prepend every bundler command with BUNDLE_GEMFILE=Gemfile.rb
and it'll work:
BUNDLE_GEMFILE=Gemfile.rb bundle install
You might also look at http://gembundler.com/man/bundle-config.1.html -- It mentions a gemfile option, but I couldn't get it to work (even after manually setting it to Gemfile.rb
, it still tried to look for Gemfile
).
来源:https://stackoverflow.com/questions/4976132/can-i-rename-my-gemfile-to-gemfile-rb