Category "ruby-on-rails"

get or post within ActionCable tests in Rails 6?

I am using a JWT to authenticate my user. So when a user want to connect to the ActionCable server, it does something like this: Get a JWT from REST endpoint:

Add Buttons to Rails ActionText toolbar

What is the best way to configure ActionText to add buttons to the toolbar. For example, an h2 and h3 button?

Getting Jquery and Bootstrap to work with Rails 6

I am a new to rails and struggling to get Jquery and Bootstrap to work with Rails 6. I think it has something to do with switching the app from rails 5 to rails

mimemagic install error: "Could not find MIME type database in the following locations..." on Windows [duplicate]

I am running into the following error when trying to install mimemagic 0.3.10 in a Ruby on Rails project. Note that it is run on a Windows env

response checksum or hash not matching in payumoney?

When notification is passed to the app after payumoney processing it sends response hash and we need to compute the hash and match it with the passed in respons

Rails: validate uniqueness of two columns (together)

I have a Release model with medium and country columns (among others). There should not be releases that share identical medium/country combinations. How would

Error while doing mina setup

I am using mina to deploy my rails app. I am using aws with nginx and rvm. Whenever I do mina setup I get Permission denied (publickey). ! Command f

Capistrano deployment error in rails application

I am getting this error on doing cap production deploy in my rails application my net-ssh version is 5.0.2 can anyone please help me how i can fix this. My serv

How to add jemalloc to existing rails server using rvm?

how to add jemalloc in a working ruby on rails server?We installed ruby using rvm. Rails version:5.2 Ruby version:2.5.1 I tried ruby -r rbconfig -e "puts R

Google keeps deleting app password (Rails)

I'm using rails and mailer. Whenever user signs up, the user gets an email confirmation. In the gmail account (business) I've set up 2-step authentication and a

How to use parallel_tests in github actions

I'm trying to use parallel_tests in my github action to run my test suite but I was not able to find a proper solution. The official docs has one but it is for

Rails + Postgres migration - why am I receiving the error "PG::UndefinedFunction: ERROR: function gen_random_uuid() does not exist"?

One of my Rails migrations uses a uuid as the primary key. The Postgres extension gen_random_uuid() should solve this issue, but I continue to get the error aft

How to merge duplicates in a column in Ruby on Rails?

I have this filter here for sign name. What I want to do is if I have more than one name of the sign to merge the content together Check the image attached. I h

Rails render error code with jsonapi-rails

I want to render error code property, as JSON API specification describes, with jsonapi_errors method in jsonapi-rails gem. How could I set the code property in

Rails: rendering a partial for a nested resource

# routes.rb resources :topics do resources :bookmarks, except: [:index] end The view files for my Bookmark model live in app/views/topics/bookmarks: I re

How do you send JSON data in a rails-ujs Rails.ajax POST call (not using jQuery)?

I have a React client app that needs to talk to a Rails API. I want to use the rails-ujs method Rails.ajax. For example: Rails.ajax({ type: "POST", url: "

Ruby On Rails - NoMethodError: undefined method `[]' for nil:NilClass

I'm trying to run on a new computer some ruby code and I receive the following error (rails db:migrate --trace) ** Invoke db:migrate (first_time) ** Invoke db:

rails generated CSV file can't be downloaded

I'm trying to export my database to CSV file and download it but it doesn't download. I have a form with 2 different actions, Export to CSV and Export to JSON I

Is it OK to specify a schema in `table_name_prefix`?

TL;DR: Is it OK to specify a schema in table_name_prefix? We have a large Rails application that is not quite a traditional multi-tenant app. We have a hundred

Line break when combining image_tag and text in Rails navbar

I want to combine a logo and the brandname as text in my bootstrap based navbar. The problem is I can't figure out why there is a line break and the text not on