Can I rename my Gemfile to Gemfile.rb

霸气de小男生 提交于 2019-12-23 15:57:38

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!