I look at it in the following way:

- Ruby and Rails are joined at the hip in a way that Python isn't. While Ruby is a general purpose language, it was only strongly adopted by web developers.

- Rails didn't have a competent deployment story initially. It was a pain to deploy and run mongrel relative to other platforms and this only seemed to get effort after the first RailsConf. The impact of this was primarily on enterprise developers who might have gotten adoption to a higher level.

- Speaking of the first RailsConf, DHH did everything possible to undermine potential advocates within the enterprise space where lots of Java refugees might have helped with adoption. ThoughtWorks backed Ruby and Rails, but there are quotes from Martin Fowler like:

"A couple of years ago I wrote about the impressions people had that the RubyPeople were notably more friendly than most software communities. Talking to people at RailsConf I got the message that that had changed for the worse. Both the ruby lists and particularly the rails lists had tended more towards the sad Internet mean. In his opening keynote Chad Fowler said that the rails community had a reputation as "a bunch of arrogant bastards" and I cringed as an, admittedly small, group raised a triumphant cheer." (https://martinfowler.com/bliki/RailsConf2007.html)

- The community was very anti-Windows which stifled adoption. The default developer machine now seems like a MBP, but it wasn't in 2007. Rails got lots of attention around the time of the Intel transition so this was a cool time to have a Mac. A PC was only usable for Rails work if you put Linux on it. Some people realized you needed better basic Windows support to run Rails for development, but it wasn't a priority. Again, this limited potential web adoption.

From this you can see a repeated pattern of mistakes which would have at least increased Rails use in the enterprise market. It was strongly adopted in startups and niches within enterprise that IT didn't control. There was no real reason to discourage this community of developers who found Rails a nice fit for what they were building.

Now Python:

- The Python community specifically targeted diversity and getting adoption in first programming classes in colleges. This was an active effort that accelerated things at least as much as use in data science. The fact that everyone was being taught Python as a first language even if they'd go the web route was a huge boon to cement it within the data science perspective.

- In the previous point I called out diversity because it was a key differentiator in getting it everywhere. Not everyone stayed in the community, but they stayed at a higher rate than Ruby. People will want to discount this because they feel it's political or woke, but it affects the TAM. I don't think you can substitute "friendly" because they knew that wasn't sufficient.

- Python has had stronger Windows support. The effort was inconsistent over time, but it existed and wasn't discouraged to the degree that it was for Ruby. Companies like Active State where popular long before Anaconda appeared on the scene.

- Packaging in Python is a disaster zone, but it's been good enough to get adoption.

- Google gave credibility to Python at a time when it was competing with Python. This swayed non-devs in decision-making roles to an extent. Importantly, Python hasn't been wed to one vendor. When Google dropped, other stepped into the fray. It seems MS are quite involved today.

- The transition from Python 2 to 3 is viewed as a misadventure by many. It did this and still won out. If you rewind to PyCon 2009/2010, the vision shared by Guido was for a long term transition with some degree of experimentation. People have forgotten, or joined late.

- Data scientists have taken over the Python community, but Django and Flask are still pretty sizeable communities. This diversity is a strength and the community is open to experimentation.

- Python performance doesn't suck much more than Ruby for the most part. If Python had disadvantages to a peer like Ruby, it may have had an impact. Instead, people inside the community complain and stay, or they peel off to Go/Rust/C#/Java/Kotlin (any faster platform) at a slower rate than you might expect. Yes, whole teams/apps drop it wholesale, but what matter is the overall number. I think this is more of a concern today (like packaging is) than it was in the key period of 2006-2012 when the battle was fought.