Category "ruby-on-rails-7"

Rails 7 css assets are not working in production, need help understanding how the asset pipeline works without webpacker

Trying out rails 7, with tailwind and postcss. I have a few stylesheets in assets/stylesheets, which I import through a file called imports.css in the same fold

Rails 7 - picking up assets automatically in dev doesn't work

For some unknown reason Rails 7 (development environment) doesn't pick up changes in application.js automatically when I hit F5 in the browser. The location app

rails7 RAILS_ENV=production rails assets:precompile error Command "build" not found

Extremly odd error, asset precompilation works fine in dev mode, but as soon as i do production mode, i get error: root@53407ec15126:/app# RAILS_ENV=production

Rails 7 Ruby 3.1 LoadError: cannot load such file -- net/smtp

I upgraded to Rails 7 and Ruby 3.1. While trying to run tests with rspec I got the error below. How can I fix it? An error occurred while loading rails_helper.

getting most liked posts by users using act as votable gem rails

I want to display the top 10 users whose posts got the most likes in past 2 hours, how can I do that inquest index to get user <%@users.each do |user| %>

NameError: uninitialized constant DeviseController

I have tried upgrading my Rails app from 6.1 to 7 and after running bundle app:update I get the following error: rails aborted! NameError: uninitialized constan

Idiomatic Sass processing in Rails 7

I'm confused about the idiomatic way to process Sass in Rails 7. The README.md for the importmap-rails repo says: This frees you from needing Webpack, Yarn, np

Error: Form responses must redirect to another location

I need to render an html code I receive from an API. In Rails 6 : I was doing this in my controller, and it was working fine. I called the webservice I received

How to implement Zurb Foundation to Rails 7?

I'm currently upgrading my rails app to 7. I was just testing it for a while then I have issues on Foundation Rails. I installed it and followed all the steps e

Trying to use select2 with Importmaps on Rails 7

I am trying to use Select2 on a new Rails 7 app and am struggling as follows: I have pinned it into my import maps and imported it like so: pin "application", p

Rails 7 (7.0.2.3) Importmap jQuery is not defined in view

I've looked around for as much help as possible regarding installing jQuery in Rails 7 (7.0.2.3). I want to use it in script tags in my views, but I can't seem

tailwind.css not being generated in a Rails 7 project in Heroku

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

Can Font Awesome be used with importmaps in Rails 7?

I'm new to Rails 7's importmap and the documentation says you can pin a JavaScript module and then import it: ./bin/importmap pin react react-dom import React

Can Font Awesome be used with importmaps in Rails 7?

I'm new to Rails 7's importmap and the documentation says you can pin a JavaScript module and then import it: ./bin/importmap pin react react-dom import React

How to solve importmap bootstrap permission denied issue?

A light Ubuntu user here (WSL). I issued the command in rails 7 (even as the root user) bin/importmap pin bootstrap and ./bin/importmap pin bootstrap but got a

How to use tailwind css gem in a rails 7 engine?

How to use tailwind in a rails engine? According to the documentation supplying a css argument to the Rails generator should work Rails 7.0.2.2 engine generated

Rails 7 collection_check_boxes not displaying checked items in edit view

Pursuant to this thread, I've tried to get my code to display which items are already checked when you display an edit view. All other fields are pre-populated

libffi.so.8: cannot open shared object file

I upgraded Rails to 7.0.1. When I do the rails g controller Pages home, it's giving the error: >>rails g controller Pages home /home/shadman/.rbenv/versio

How to add custom font on Rails app (version 7)

In development mode the custom fonts (Raleway) are present but it is not reflected in the staging environment. I deployed my app to Heroku. Added the following

Rails 7 and Tailwind dynamic classes

I have a Rails 7 app with tailwind where I'm doing something like this: @list = [{name: "Some", width: "3/12"}, {name: "other", width: "6/12"}] # In the view &