3 ms·
I wouldn't recommend it today. Ruby/Rails is 10x to 20x slower as a web server compared to web frameworks for languages that were designed to be concurrent like
by Zimbleton 8y ago
I wouldn't recommend it today. Ruby/Rails is 10x to 20x slower as a web server compared to web frameworks for languages that were designed to be concurrent like Java (Play), Erlang (Plug, Phoenix), and GoLang (Gin, Martini). Even Nodejs Express is 3x faster. Benchmarks here: https://github.com/mroth/phoenix-showdown https://github.com/mroth/phoenix-showdown
One of the core Rails developers José Valim created his own language Elixir built on top of Erlang and web framework Phoenix.
Ruby is a beautiful language - well written code can bring a tear to your eye like Haiku. But its not designed for concurrency so you have to bend over backwards to add caching and scale your web server a lot more than other languages.
Learning Ruby/Rails and being part of a team that followed Sandi Metz 5 Rules and TDD made me a better programmer in other languages.
Most companies are moving towards microservice architure where each service runs separately and can use whatever language makes sense for that service. We replaced our monolithic Rails web app with 20+ microservices, most of which use Golang, some Python and Node and Java. The main web server service renders one html page (about 20 lines!) that simply renders a React app that communicates with our API server (API server router then routes to the correct microservice).
We don't need Rails view templates or localisation support as most dynamic websites do this clientside. Doing lots of Javascript in Rails was always clunky and poorly supported until a year or so ago when they caught up and added modules and hot reloading support.
We have found Golang very easy to learn, ridiculously fast to compile and run tests and very robust. Google said it was designed for Programmer enjoyment and it really shows.