有没有办法将 Ruby gem 推送到自己的服务器上?我想让它被外部应用程序公开访问。我尝试使用 geminabox,但我已经读到 geminabox 设置一个服务器来托管组织内的 gem。请给予建议。
提前感谢。
提前感谢。
使用服务器上的Gems
使用gem sources命令将Gem服务器添加到您的系统wide Gem源中。
gem sources --add http://localhost:9292
然后像往常一样安装gems:
gem install secretgem
Successfully installed secretgem-0.0.1 1 gem installed
cat Gemfile
source "http://localhost:9292"
gem "secretgem"
bundle
Using secretgem (0.0.1)
Using bundler (1.0.13)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Extracted from RubyGems Guides