Hacker News new | past | comments | ask | show | jobs | submit login

I want to try Ruby since the news of Rails 8 came out, but it's been so difficult that I just gave up. Installing Ruby on Mac and Windows and actually getting the 3.3 version required for Rails 8 was a huge mission and test of patience because every installer defaulted to older versions of both Ruby and Rails even one month after the release. And yes, even Docker required tweaking to get the versions and I had issues with devContainers anyway...

I finally got it installed and then followed some tutorials only to see that Rails' html.erb files have completely broken syntax highlighting in VSCode and other editors. I facepalmed and though I tried to search for a fix online, I couldn't find one. I saw posts mentioning it in forums and yet not a single solution posted.

So I gave up. I tried in Mac, Windows and Linux. If someone here knows how to fix the broken highlighter, that can be my Christmas gift today, but for the most part I've moved on.






Use asdf (https://asdf-vm.com/) to manage your Ruby versions.

You should be able to do

$ asdf plugin add ruby

$ asdf list all ruby (you'll see 3.4.1, the latest is available)

$ asdf install ruby 3.4.1

And now you can use Ruby 3.4.1 with no issues. Follow that up with

$ gem install bundler

$ gem install rails

$ rails new ...



I've found the easiest way to have a nice, consistent, working Ruby installation is to install from source. Ubuntu, Debian or Fedora are the easiest. There are a bunch of one-liners to install all the dependencies on various distros floating around. The Ruby website has instructions but the gist of it is, run ./configure, then make, then make install. Actually pretty easy. Gem is great for managing libraries, certainly better than any Python solution for that ecosystem.

Use rvm to install ruby. Ruby dev sucks on Windows, mac only.

I think this is a major reason Ruby had trouble taking off compared to Python. Most desktops were Windows, especially for businesses.

typical hn comments,ignoring elephant in the room.

What sucks about it?

Most gems with native extensions won't work. Gems that listen to filesystem changes like guard can be buggy. I recommend using Mac or Linux for Ruby on Rails development.

Ruby and rvm sucks also on linux (at least on SteamDeck).

Only way to reliably use ruby seems to be docker.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: