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 ...


Like psychoslave suggested, try out mise (https://github.com/jdx/mise). I used asdf for years, did the switch to mise and have never looked back for package management. It supports a huge number of languages and is performant.



Thanks for this.

I used to use ruby a lot - mostly just because it's the nicest language for scripting things on unix. I can remember trying to get it set up a year or so ago and finding the process difficult (think I was using rvm).

https://github.com/rbenv/ruby-build/wiki#suggested-build-env...

probably good idea to point people here before they install ruby, since it'll compile for minutes then tell you it's missing a dependency, and you have to start the whole process over.


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.


On Mac, rbenv or asdf are both great. Also other commenters here have good suggestions. I never had problems with VSCode; curious what you ran into here.


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.


It actually works quite well, if you use WSL.

Ruby itself works okay on bare-metal Windows, but virtually guaranteed any decent size Rails project will use some native gem that's a nightmare to get to build on Windows.


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


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.


The listen gem works on windows: https://github.com/guard/listen?tab=readme-ov-file#listen-ad... . Not sure whether guard builds on top of it.


Only way to reliably use ruby seems to be docker.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: