r/ruby•
Klopp___

Help! Migrating Ruby on Rails Projects from Ubuntu 20.04 to Fedora 40/Ubuntu 24.04 - Gem Install Issues

Hey everyone,

I'm having a lot of trouble migrating my development environment from Ubuntu 20.04 (which I haven't updated in a while) to Fedora 40 or Ubuntu 24.04. I'm running 10 Ruby on Rails applications (Ruby 2.5.1, Rails 5.2.1) and using RVM and NVM for package management.

Here's the breakdown of the issues I'm facing:

  • Gem Installation: I'm having major issues with bundle install due to gems like Nokogiri, nio4r, saas-rails (specifically the saasc gem underneath) not being compatible with the newer Ruby versions. I've tried workarounds like passing --with-cflags="-Wno-incompatible-pointer-types" for gem install (and bundle config build.nio4r --with-cflags="-Wno-incompatible-pointer-types", for example), but that only partially fixes things. I'm also encountering frequent errors with the bundler gem itself.
  • Compiler Issues: I initially suspected the newer compiler in Fedora 40 could be causing problems, but I'm seeing the same issues on Ubuntu 24.04.

What I've tried:

  • Installing Ruby using RVM (the one I had more experience and I had less trouble), asdf, rbenv, and mise.
  • Installing the following libraries before installing Ruby:

sudo apt-get update sudo apt-get install git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev

Any help would be greatly appreciated!

I'm not sure if this is a problem with the older Ruby version I'm using, the newer OS versions, or something else entirely. I'm hoping someone has encountered similar issues or has some insights into how to overcome this. I'm happy to provide more information about my setup if needed.

Thanks in advance for your help!

Posted Jun 22, 2024, 7:57 PM UTC

11

Comments aren't archived yet

This post had 1 comment on Reddit. Comments for this period haven't been loaded into the archive yet.