I think the version of ruby didn’t have the dev tools installed so it couldn’t build all the gems it needed and now you have the dev tools so it works.
I think the version of ruby didn’t have the dev tools installed so it couldn’t build all the gems it needed and now you have the dev tools so it works.