uwsgi icon indicating copy to clipboard operation
uwsgi copied to clipboard

Gem Install failing: extconf.rb not pulling install.sh

Open aThorp96 opened this issue 6 years ago • 4 comments

During installation, the gem attempts to download install.sh from uwsgi.it/install, but the response body says the file has been moved permanently. Redirecting extconf.rb to pull the file from github allows the install to complete as normal.

aThorp96 avatar Jan 14 '20 16:01 aThorp96

It is probably also worth noting that when running the master branch copy of extconf.rb, the response of the http request was a 404...

aThorp96 avatar Jan 14 '20 20:01 aThorp96

This is still a problem after the 2.0.18 release.

aThorp96 avatar Feb 14 '20 16:02 aThorp96

Still broken Error in the logs ends up looking like:

/var/lib/gems/2.5.0/gems/uwsgi-2.0.19/bin/uwsgi:4:in `exec': No such file or directory - /var/lib/gems/2.5.0/gems/uwsgi-2.0.19/ext/uwsgi/uwsgi.ruby

'cause it couldn't build that file, since it couldn't find the install script.

Wulfson avatar Jun 26 '20 15:06 Wulfson

I "fixed" this for my purposes by unpacking the gem and making the following changes:

--- ./uwsgi-2.0.19/ext/uwsgi/extconf.rb     2023-08-16 16:03:05.404760188 -0400
+++ ./uwsgi-2.0.19-PATCHED/ext/uwsgi/extconf.rb   2023-08-16 16:09:04.183706439 -0400
@@ -1,10 +1,10 @@
 require 'net/http'
+require 'uri'
 
-Net::HTTP.start("uwsgi.it") do |http|
-  resp = http.get("/install")
-  open("install.sh", "wb") do |file|
-      file.write(resp.body)
-  end
+uri = URI.parse("https://raw.githubusercontent.com/unbit/uwsgi/master/install.sh")
+resp= Net::HTTP.get_response(uri)
+open("install.sh", "wb") do |file|
+    file.write(resp.body)
 end
 
 major,minor = RUBY_VERSION.split('.')

then repacking it and just using that instead

Wulfson avatar Aug 16 '23 20:08 Wulfson