rails / tailwindcss-rails

MIT License
1.39k stars 171 forks source link

Installing Tailwind into an existing project #368

Closed tmpearsall closed 4 months ago

tmpearsall commented 4 months ago

I am attempting to install tailwindcss-rails into an existing, newly created, test project. The following error is displayed:

texamp % ./bin/bundle add tailwindcss-rails [31494, #, #<NameError: uninitialized constant Gem::Source

  (defined?(@source) && @source) || Gem::Source::Installed.new
                                       ^^^^^^^^

Did you mean? Gem::SourceList>

tailwindcss exists on the system and was built following the instructions on Tailwind's site. I checked that tailwindcss is in /Users/tmpearsall/.rvm/gems/ruby-3.1.2/bin

Environment: macOS 14.5 Ruby 3.1.2 via RVM Rails 7.1.3.3

tmpearsall commented 4 months ago

UPDATE: It appears that if I add tailwindcss-rails, with a version number, to the Gemfile and run ./bin/bundle install everything works. Not sure, except for the version number, what is different.

flavorjones commented 4 months ago

@tmpearsall Please provide the complete output from the error. Without file or line numbers I can't diagnose what's happening.

However, that line of code is not from this gem, but from Bundler -- bundler/lib/bundler/rubygems_ext.rb -- and so you may want to report this at rubygems/rubygems.