tailwindcss-rails | A gem to install Tailwind CSS - https | Frontend Framework library
kandi X-RAY | tailwindcss-rails Summary
kandi X-RAY | tailwindcss-rails Summary
A gem to install Tailwind CSS -
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tailwindcss-rails
tailwindcss-rails Key Features
tailwindcss-rails Examples and Code Snippets
Community Discussions
Trending Discussions on tailwindcss-rails
QUESTION
I have a Rails 7 project using TailwindCSS deployed to Heroku that is not building tailwind.css
during rake asset:precompile
and I don't know why. When I try to access the application, it crashes with this error:
ANSWER
Answered 2022-Mar-23 at 15:15Try running the following commands on your local machine:
QUESTION
I have a relatively new Rails 6 app (Rails 6.1.3.1), so there's not a whole lot of customization yet. However, I cannot get session variables to persist.
For example, if I put something like the following in a controller action:
...ANSWER
Answered 2021-Jul-15 at 06:00Ok, found the problem. Turns out that I had copied the setting config.session_store :cache_store
in development.rb
from a different project I had been working on. However, this setting was added as part of the StimulusReflex setup for that other project.
From the StimulusReflex docs:
Cookie-based session storage is not currently supported by StimulusReflex.
Instead, we enable caching in the development environment so that we can assign our user session data to be managed by the cache store.
The default setting for this option is cookie_store
. By changing it to :cache_store
without specifying a cache repo, it implements ActionDispatch::Session::CacheStore and defaults to storing it in Rails.cache
, which uses the :file_store
option, which dumps it in tmp/cache
.
However, further down in development.rb
, there is some conditional logic that assigns config.cache_store
to :null_store
if there is no caching-dev.txt
file. This implements ActiveSupport::Cache::NullStore, which is "a cache store implementation which doesn't actually store anything."
So because I had not enabled caching with rails dev:cache
for this project, the session cache was getting toasted with every request.
LESSON LEARNED: Be very careful when copying config settings from an old project to a new one!
QUESTION
I created a brand new project using Rails 6.2.1 and I added tailwindcss-rails. Some of it works, but colors for example seem not to be working. The snippet from https://play.tailwindcss.com/ looks like this when I embed it on my project:
All my source code is here https://github.com/pupeno/imok
Any ideas what's going on here?
Thank you.
...ANSWER
Answered 2021-Feb-16 at 04:19You have to add the colors cyan
and light-blue
(used in the default playground code) to tailwind.config.js
since they don't come with the default theme.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tailwindcss-rails
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page