With some basic PHP knowledge, should I learn Python - Django or Ruby - Rails, i.e., which of the two has the more promising future?

I've used both frameworks pretty heavily, and each has its strengths and weaknesses.  The key differences have their roots in the philosophies and goals of the core framework developers, and those of the language creators.  It's true that either one is a great choice, but realistically everybody's time is limited and thus need to

Why should I learn Ruby on Rails in 2017?

Because Rails is fun! And because backend programming is not what Javascript was intended for. Ruby was written to be beautiful. Worth coding in that.

Is it worth learning Ruby these days?

tl;dr Yes. Ruby is bigger than Rails. There are still a lot of jobs available. Learning Ruby will influence how you use other languages.Here's a tip:If you spend all your time jumping between the latest languages and frameworks you will have a very unsatisfying career, never learning

Why is Ruby bad for making CGI?

There are hundreds of languages not used in game development. And it has nothing to do with CGI. First things first, for games you want the most close to the bare metal and that is in the C++ family. Also Swift for iOS or Java/Dalvik for Android. Lots of first