Ruby on Rails:修补 Rack 并部署它 [英] Ruby on Rails: patching Rack and deploying it

查看:39
本文介绍了Ruby on Rails:修补 Rack 并部署它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用以下补丁来修补 Rack:http://github.com/rack/机架/提交/dae12e088592ee69545b5f2f81b87f4959859164

I need to patch Rack with the following patch: http://github.com/rack/rack/commit/dae12e088592ee69545b5f2f81b87f4959859164

这样做的最佳做法是什么?我是否应该解压 gem,应用补丁,然后重新打包 gem 并与 capistrano 一起运送,以确保我的 gem 版本到达目标服务器?

What's the best practice for doing this? Should I gem unpack, apply the patch, then repack the gem and ship it with capistrano to make sure my version of the gem gets to the destination server?

我可以直接将机架弹出到 vendor/plugins/并依赖它在系统范围的 gem 之前首先加载吗?

can I just pop rack into vendor/plugins/ and rely on it being loaded first prior to the system wide gem?

我想走阻力最小的道路,并且能够轻松地将其部署到许多环境中.

I want to take the path of least resistance and easily be able to deploy this to many environments.

推荐答案

你可以使用 bundler 从存储库安装 gems,如果你正在使用它,通过在你的 Gemfile 中添加一个选项:

You can install gems from a repository using bundler if you're using that by adding an option to your Gemfile:

gem 'rack', :git => 'git://github.com/my-account/rack.git'

gem 'rack', :git => 'git://github.com/my-account/rack.git'

这使得修补和部署修补过的 gem 变得更加容易.将其分叉到您的帐户,对其进行修补,然后改用该基础.

This makes patching and deploying patched gems a lot easier. Fork it to your account, patch it, and use that base instead.

Rack 不是插件,而是一个 gem,因此如果安装在 vendor/plugins 中,它可能无法正常工作.

Rack isn't a plugin, it's a gem, so it probably won't work properly if installed in vendor/plugins.

这篇关于Ruby on Rails:修补 Rack 并部署它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆