Hi everyone!
I’m new to both NixOS and Ruby on Rails, and I’m currently trying to learn them at the same time.
I’m using the devenv.sh
Ruby on Rails example to set up a development environment. When I initialized the Rails app, I used the --css=tailwind
flag. However, I get the following error :
Compile initial Tailwind build
run rails tailwindcss:build from “.”
Could not start dynamically linked executable: /home/tortillas/Code/Entrainement/rubyonrails3/.devenv/state/.bundle/ruby/3.2.0/gems/tailwindcss-ruby-4.1.3-x86_64-linux-gnu/exe/x86_64-linux-gnu/tailwindcss
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
Frequently Asked Questions — nix.dev documentation
bin/rails aborted!
Command failed with exit 127: /home/tortillas/Code/Entrainement/rubyonrails3/.devenv/state/.bundle/ruby/3.2.0/gems/tailwindcss-ruby-4.1.3-x86_64-linux-gnu/exe/x86_64-linux-gnu/tailwindcssTasks: TOP => tailwindcss:build
(See full trace by running task with --trace)
From what I understand, it seems like the bundled Tailwind binary isn’t compatible with NixOS due to how dynamic linking works. But I’m not sure what the best workaround is.
Is there a recommended way to get Tailwind working in a Rails project on NixOS?
Any help would be appreciated!
Thanks in advance