Ruby on Rails: rack fix and deployment

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

What is the best practice for this? Should I print the card, apply the patch, and then repack the gem and send it using capistrano to make sure my version of the gem gets to the destination server?

Can I just put the rack in the vendor / plugins / and rely on the fact that it is loaded first before the system crashes?

I want to take the path of least resistance and can easily deploy it in many environments.

+2
source share
3 answers

, bundler, , Gemfile:

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

. , .

- , , , , , vendor/plugins.

+2

git Bundler , vendor/:

gem 'rack', :path => File.join(File.dirname(__FILE__), '/vendor/gems/rack')

" " git / .

+1

Other answers seem to require Bundler / Rails 3. Since I use Rails 2.3.10 and the old Rails config.gem system, they did not work for me.

I managed to find a working solution for the same problem here . The author included the fixed code from Rack 1.2 in the monkey patch for rack 1.1 , and then downloaded the patch file through the initializer.

+1
source

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


All Articles