Category "ruby-on-rails"

What can be the reason for 'config.force_ssl = false' in rails app?

I found that config.force_ssl = false in config/application.rb, and nowhere it is defined as true, though the domain have SSL certificate. will there be any spe

Is there a way to get validity (notAfter) from a openssl certificate fingerprint and no certificate?

Is there a way I can determine when a particular certificate fingerprint without having the certificate itself? something like OpenSSL::X509::Certificate.new("-

Creating and migrating a devise-driven User model in a main/replica context

The following main/replica database structure development: primary: <<: *default database: users_development username: deploy_root passw

Change parameter name FORM_WITH VS FORM_FOR

I am using rails 5 and the form_with helper. My code works when using Form_for, but not Form_with. Is the :as parameter not valid with Form_with? View <%= f

Breakpoint not working on VScode for Rspec Rails

Not sure what's wrong with my setup. I've been stuck on this issue for a day now and still hasn't resolved this. I've setup my VScode so I can debug my specs (f

Rails: ActiveSupport::MessageEncryptor::InvalidMessage

Help me please, I've finished 11 chapters of the rails tutorial, deployed my app to heroku (locally it worked perfectly) and it crashing all time. I'm using rai

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

Dockerized Minio for local use not accepting files

I would like to use Minio locally to replicate an S3 like storage. Installed through docker : sudo docker run \ -p 9000:9000 \ -p 9001:9001 \ --name minio

What is perform_async in sidekiq

I want to know about perform_async in sidekiq. As I could not found any documentation on this while everyone is using this. So can someone please explain this

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

Make Active Storage has_one_attatched not null

I have a model with active storage set up with has_one_attached and some users have hit submit without adding a file to the form. Before I add a validation to t

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 &

bind rails app on the IP provided by the host with 3000 port

I am running the rails app on VPS server provided by my host. I need to run the same local app to the IP provided by them. For eg myip:3000 Is it possible to

Rails: may have been in progress in another thread when fork() was called

After I upgrade to OS10.14, I got this error when I called Httparty response = HTTParty.get('http://api.stackexchange.com/2.2/questions?site=stackoverflow')

Invalid request parameters: invalid %-encoding when upload file to Rails api only server

I am working on web app that use Reactjs as a front-end and Rails5 api only app as a back-end This is the data that i send to the server as Request payload --

Unable to autoload constant ActiveStorage::Blob::Analyzable Error with Rails 5.2, AWS S3, and ActiveStorage

I've been battling this guy for a while and have done all the Googlies on it (here, here, and many equally-unhelpful others) but to no avail. The official erro

Rails: JSON round trip from database to TEXTAREA converts to string on second save

(Rails 5.2) My record with JSON is saving correctly to the (Postgres 9.4) database on CREATE but is getting reformatted after UPDATE, with carriage returns (\r)

What is the return value of update_all() in ActiveRecord / Ruby on Rails?

The Ruby on Rails and ActiveRecord documentation, Google, and StackOverflow are conspiratorially silent on the return value of update_all() What does update_al

Factory Girl pass parameter to trait

I've been banging my head over this. I want to be able to overwrite attributes on top of traits. I've been reading the documentation and some internet examples