Custom Ruby Gem in Gemfile on Heroku

前端 未结 4 1091
清酒与你
清酒与你 2020-12-15 08:17

I\'ve modified a Gem that I use in my Rails app, and need to use it on Heroku. Is there a way to upload the modified Gem to Heroku within my app and specify a custom path in

相关标签:
4条回答
  • 2020-12-15 08:55

    You can set up a custom gem server like Geminabox. Unfortunately, it is designed for a LAN and has no built-in authentication. You can protect it via Rack::Auth middleware or use Rack::Mount to attach it to a secret path. If that's too tedious, you can use a private gem hosting service like Gemfury (disclaimer: I work on this service). Once you have either of those set up, just add the following to your Gemfile:

    source 'https://custom-gem-server.com/secret-token/'
    
    0 讨论(0)
  • 2020-12-15 09:00

    You can place custom gems in the vendor directory and then specify them in your Gemfile:

    gem 'gemname', '1.0', :path => 'vendor/gemname'

    0 讨论(0)
  • 2020-12-15 09:00
    1. Fork it on github
    2. Point your application to your modified gem using :git option when specifying gem dependency in Gemfile
    0 讨论(0)
  • 2020-12-15 09:12

    in Gemfile: gem 'blah', :git => 'https://github.com/XXX/YYY.git'

    0 讨论(0)
提交回复
热议问题