Can I rename my Gemfile to Gemfile.rb

Without a file extension, I cannot get syntax highlighting. This is not the end of the world, but I would appreciate it.

Will it break Rails if I rename the Gemfile as Gemfile.rb ?

+4
source share
1 answer

It looks like you can rename it, but the package will not find it automatically.

However, you can simply add the command of each provider to BUNDLE_GEMFILE=Gemfile.rb , and it will work:

 BUNDLE_GEMFILE=Gemfile.rb bundle install 

You can also see http://gembundler.com/man/bundle-config.1.html - It mentions the gemfile parameter, but I couldn’t get it working (even after manually setting it to Gemfile.rb , it still tried find Gemfile ).

+6
source

Source: https://habr.com/ru/post/1339442/


All Articles