Category "ruby-on-rails"

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

Uninitialized constant User::ChatRoom

I get this error NameError (uninitialized constant User::ChatRoom): app/controllers/users_controller.rb:20:in `create' Here is my user.rb file class User in

Use both Tailwind and SCSS with cssbundling-rails

In the Rails 6 project I'm working on, we're looking upgrade from webpacker to cssbundling-rails and jsbundling-rails. We currently use Tailwind with SCSS, but

Search Fullname, in two fields firstname, lastname rails

I'm working a search box for my application i have two fields firstname and lastname. I create a full_name method for them. Profile model: def full_name "#{se

missing required option :name

I am trying to set up AWS, and carrierwave to upload pictures from my website. I keep getting the error 'missing required option :name' when I try to upload/upd

Ruby 3 - Save without validation no longer works on one table

I am upgrading an application from Ruby 2.6.10 to Ruby 3.0.4 and have a very odd situation. When I execute the command record.save(validate: false) on one of m

Arel - How to coalesce a field and a string literal in an Arel query?

I inherited a big, complicated Arel query that pulled from a number of tables. A new requirement says that if one of those tabels doesn't have a value for a par

Problem with Creation form (Simpleform) PG::NotNullViolation: ERROR: null value in column with Rails

Hello i have an issue with my app Rails when i try to create an "Enfant" who belongs to an user and a Nounou but my problem is when i create an "enfant" i'm a u

Unable to search on whole database with searchkick as it limits to 10000 records

Unable to search on whole elastic search DB just by using SearchData.search('yamaha', match: :word_middle,load: false) This limits the search to 10000 records