Although I followed all the steps and even tried the
--css-tailwind pre-configured project setup
I always get the same Error
/var/lib/gems/3.0.0/gems/tailwindcss-rails-2.0.27-x86_64-linux/exe/x86_64-linux/tailwindcss: 1: ELF: not found
/var/lib/gems/3.0.0/gems/tailwindcss-rails-2.0.27-x86_64-linux/exe/x86_64-linux/tailwindcss: 4: Syntax error: word unexpected (expecting ")")
Command failed with exit 2: /var/lib/gems/3.0.0/gems/tailwindcss-rails-2.0.27-x86_64-linux/exe/x86_64-linux/tailwindcss
Tasks: TOP => assets:precompile => tailwindcss:build
(See full trace by running task with --trace)
Additionally, I get the following when I try to use the tailwind
The asset "tailwind.css" is not present in the asset pipeline.
NOTE: I am using ubuntu 22.04.2 via WSL version 1
…I followed all the steps…
did you mean the steps mentioned by the gem?
Have you tried doing a bundle install/update just to check the gem installed successfully?
rails new app plus
bundle add tailwindcss-rails and
ruby “3.2.0” # I think the tutorial is set for 3.2.1
gem “rails”, “~> 7.0.4”, “>= 220.127.116.11”
gem “puma”, “~> 5.0”
gem “tailwindcss-rails”, “~> 2.0”
Works fine on macOS. I just did this session a day or two ago.
Beyond what was asked but Tailwindcss removes some formatting but a class ‘prose’ at top level adds basic formatting.
yes I did, I made sure its installed
It looks like there is something wrong with your tailwind executable
can you run tailwindcss from the command line?
if not try “gem uninstall tailwindcss-rails” and then run bundler again.
Hello, I also encountered the same problem. How did you succeed
After installing Tailwind CSS, I encountered the same error, even though I followed the installation steps outlined in the official Tailwind documentation. To overcome the issue, I turned to the “Tailwind CSS for Rails” documentation in github, which provided the solution I needed. A critical step that made a difference was executing the following command:
If you’re facing a similar problem, I recommend referring to the Tailwind CSS for Rails for detailed instructions on resolving this issue.