I tried to install Rails the other day. The amount of issues I had to set it up with Homebrew on macOS is just terrifying. In the end I managed to get the app running but assets weren’t compiling. I gave up. It’s 2022 and getting Ruby and Rails running is as difficult as it was 10 years ago.
Compare to Node or even Elixir, this is a no-go for me. I give up on Rails.
Article is a deep dive into ruby internals, which is technically interesting but probably beyond the average ruby/rails programmer's routine. And otherwise, certainly not relevant to you. The back button is over there.
"ME NO CAN INSTALL RAILS" is an entirely different thing. Lately I've noticed how more technical HN posts often get this "turd in the punchbowl" type first comment. I can speculate that a certain popular site has gone down the toilet to the extent that they show up here and are intimidated by some of the contents.
I’ve been ramping up learning rails over the past year. When I wanted to set up an environment on my laptop I googled “install rails M1 Mac” and found a guide and it worked first try.
When I wanted to set it up on another machine I did the same. It also worked.
Then I was pulling down a repo I had been working on and realized I had the wrong ruby version. I knew this because I had an error message that said something like can’t find this ruby version. So then I googled how do I change the active ruby version rails or something. I read the answers and changed the version then it all worked.
I’ve been doing some version of digital development of something or other for a living since about 1997.
Except for switching from trying to find the right page in a book to typing it into google it’s been basically the same process described above every time. Every year, every language.
This comment seems off topic and it's heavily down-voted but there is an element of truth to what this person is saying. Please hear me out.
I've been through the process of installing Ruby on a Linux (Ubuntu 20.04) laptop I got for my new job. Here is how it went:
1. I obviously can't just `sudo apt install ruby` as the version used by projects differ, and also differ from the one in the repositories. This has been an issue since forever with ruby on Linux.
2. Tried installing rvm as this was the method I knew from a long time ago (before I started using docker for local development). The one in the repository could not install ruby properly and the one from rvm.io gave gpg errors.
3. Tried installing rbenv, again the one from repositories had problems when installing ruby versions.
4. Installed homebrew on Linux (yes you heard that right, homebrew, a mac tool, on Linux).
5. Finally managed to `brew install rbenv` and `rbenv install $RUBY_VERSION`.
6. Of course, the normal stuff like needing to install `libpq` and `libffi`, and other build packages, because `bundle install` would not finish successfully without them. Error messages for these are still cryptic, you figure out the issue if you read them carefully, but still a pain.
So yes, it's not necessarily Rails's or Ruby's fault, but it is a struggle today just as it was back in the day. And I think this problem needs to be acknowledged and worked on by the ruby community. It's a shame since ruby itself brought the world a lot of wonderful tools and practices that I think improved developer experience (it certainly did for me) and seeing it being neglected like this is painful.
P.S. Nowadays I do all my development work withing a docker-compose setup, I don't even need ruby installed on my laptop. But I think new joiners in the ruby community need a better on-boarding experience.
Someone made the same web app in 11 different languages and loves rails but admitted there's install issues: https://www.youtube.com/watch?v=FQPlEnKav48 (rails is the first framework reviewed, from 1m 40s).
I only code in 2 languages (R, and ruby) and first installed ruby before I had any computer science experience, and it took me 2 weeks to install (I tried with rbenv, had problems, then followed stack overflow instructions which concerned rvm, which in hindsight borked my install, laughably, but completely innocent mistake at the time). Amazing to learn the terminal, ruby, rails and a bunch of other things all at the same time, but compare that to onboarding to a language like R, which takes 3 minutes from first google search to install (including the remarkable RStudio IDE). 2 weeks Vs 3 minutes.
I love ruby/rails but I think being honest about newbie experience is important. I think ruby/rails communities suffer a little from the curse of knowledge. i.e. lots of very experienced people can't quite fathom how a newbie could even struggle.
I think a good test is whether a smart/leading person from another language or framework can use google to successfully and painlessly get started. If they can get everything up and running in good time, then we're in good shape, but otherwise it's a signal for potential to improve the newbie experience.
All this said, I'm like an excited kid every line of ruby/rails I write.
This. I think docker could be the 'go to' standard for ruby/rails devs for the next decade. Will save so many system-level setup/config problems, and hence a lot of time.
I wonder if there are any good arguments against docker for ruby/rails. Would be interested to hear them if there are.
I haven't used docker for ruby/rails yet, but intend to very soon, and really look forward to it.
The problem is that even if it's not Ruby's problem directly, people who don't know the ecosystem will still get stuck along the way.
Every Ruby developer I know users rbenv, rvm or asdf to manage their versions and take the permissions and path woes of competing package managers out of the equation entirely.
You need to know this before you start or you're going to have a bad time.
maybe? it’s a terrible newbie experience. but once you know how to use a version manager, things get a lot easier. it’s been this way for forever, and the problem is not limited to ruby.
I'd like to hear what issues you had. I maintain a mac.install.guide for Ruby on Rails [0] and hearing about your problems might help me improve the guide for others. Email in my profile.
Compare to Node or even Elixir, this is a no-go for me. I give up on Rails.