How to use gems not in a Gemfile when working with bundler?

前端 未结 6 1363
失恋的感觉
失恋的感觉 2020-12-28 15:18

When using bundler with a project in general and Rails specifically, you have access only to gems defined in your Gemfile. While this makes sense, it can be limiting. Mostly

6条回答
  •  醉话见心
    2020-12-28 16:01

    In case you still decide to do this (horrible idea):

    You can add ruby code to your Gemfile to load a ~/.gemfile (or such) if it exists.

    Something like:

    eval(IO.read('~/.gemfile'), binding) if FileTest.exists?("~/.gemfile")
    

提交回复
热议问题