rails tailwindcss:build ELF not found error #278
Replies: 7 comments 4 replies
-
@goodpersons Sorry you're having problems. I'll try to help. Can you please reply with the full output of the command |
Beta Was this translation helpful? Give feedback.
-
@flavorjones Thank you for your reply. This is the bundle env output zgl@LAPTOP-9FJ4SQII:/mnt/d/zgl/my_block$ bundle env Environment
Bundler Build Metadata
Bundler settings
GemfileGemfilesource "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "3.1.2"
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.4"
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"
# Use pg as the database for Active Record
gem "pg", "~> 1.1"
# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem "importmap-rails"
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem "turbo-rails"
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem "stimulus-rails"
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem "jbuilder"
# Use Redis adapter to run Action Cable in production
gem "redis", "~> 4.0"
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false
# Use Sass to process CSS
# gem "sassc-rails"
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
gem "image_processing", "~> 1.2"
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri mingw x64_mingw ]
end
group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
end
group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem "capybara"
gem "selenium-webdriver"
gem "webdrivers"
end
gem "devise", "~> 4.9" Gemfile.lock
|
Beta Was this translation helpful? Give feedback.
-
Thank you. This configuration looks OK to me, so I suspect this is an issue with your system. Can you tell me more about your system? Are you running on WSL, or is this native linux? Can you try the following:
For example:
|
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your suggestion, but I still haven't been able to solve the problem。
After upgrading to WSL, the problem remained the same. |
Beta Was this translation helpful? Give feedback.
-
I've migrated this to a Discussion in case anyone who also uses Windows might be able to help you diagnose what's going on. |
Beta Was this translation helpful? Give feedback.
-
Hi I have the same problem, I am using WSL1 with a Ubuntu distro, after running both commands, a new file with gibberish name is created in the project root that has no content. |
Beta Was this translation helpful? Give feedback.
-
My ruby version is 3.1.2 and rails version is 7.0.6 .When I successfully executed “bundle add tailwindcss rails”。The installed version is tailwindcss rails 2.0.30 (x86_64 Linux)。
I failed to execute “rails tailwindcss: install” and generated garbled files。
I have tried Google related issues but have not been resolved. I hope to receive help。
Here's my error report:
zgl@LAPTOP-9FJ4SQII:/mnt/d/zgl/my_block$ rails tailwindcss:install
Add Tailwindcss include tags and container element in application layout
insert app/views/layouts/application.html.erb
Build into app/assets/builds
exist app/assets/builds
create app/assets/builds/.keep
append app/assets/config/manifest.js
append .gitignore
Add default config/tailwindcss.config.js
create config/tailwind.config.js
Add default app/assets/stylesheets/application.tailwind.css
create app/assets/stylesheets/application.tailwind.css
Add default Procfile.dev
create Procfile.dev
Ensure foreman is installed
run gem install foreman from "."
Successfully installed foreman-0.87.2
Parsing documentation for foreman-0.87.2
Done installing documentation for foreman after 1 seconds
1 gem installed
Add bin/dev to start foreman
create bin/dev
Compile initial Tailwind build
run rails tailwindcss:build from "."
/home/zgl/.rvm/gems/ruby-3.1.2/gems/tailwindcss-rails-2.0.30-x86_64-linux/exe/x86_64-linux/tailwindcss: 1: �ELF����: not found
/home/zgl/.rvm/gems/ruby-3.1.2/gems/tailwindcss-rails-2.0.30-x86_64-linux/exe/x86_64-linux/tailwindcss: 4: Syntax error: word unexpected (expecting ")")
rails aborted!
Command failed with exit 2: /home/zgl/.rvm/gems/ruby-3.1.2/gems/tailwindcss-rails-2.0.30-x86_64-linux/exe/x86_64-linux/tailwindcss
Tasks: TOP => tailwindcss:build
(See full trace by running task with --trace)
Beta Was this translation helpful? Give feedback.
All reactions