Installing rails on ubuntu 20.04 showing BUILD FAILED error

I think you didn’t install curl. To install it run:

$ sudo apt install curl