Category "ruby-on-rails"

cannot load such file -- mysql2/mysql2

I am doing the installation on m1 mac and I am stuck mysql issue. my rails server is working fine but when I run my spec then I got cannot load such file -- m

Getting 500 Internal Server Error while trying to send an email using Mailgun in Heroku , using Rails 7 and mail_form

I was following this tutorial right here https://gist.github.com/stevecondylios/16a53b73f22621e3cde2e17096dbf5ca Which teaches you how to make a simple contact

Monitor ActiveRecord records and find patterns

Well, I'll try to be as clear as possible in my problem, and I hope to get answers with Ruby because I'm currently studying Ruby on Rails, but of course other s

turbo_confirm not working in a Rails 7 app with turbo-rails 1.0.1

In a Rails 7 app, I am trying to ask the user to confirm before destroying a resource. In my erb view, I have the following tag: <%= button_to 'Destroy', acc

how to add PSQL user For a Rails app that has full access but can't drop the database

How to configure a PSQL v11.4 user that is not the superuser and does not own the database. This user should have full access to create SQL objects and drop the

Place images on same line [Ruby on Rails]

I have badges that are displayed on profile pages But there is this block of white space that fills in. I am not sure how to position the badges appropriately.

Rubocop: Assignment Branch Condition size for method is too high. How can I reduce the method?

This block of code: def set_conversation @conversation = Conversation.find(params[:conversation_id]) .match.origin_target.

Rails 7 Import Maps - import folder with custom scripts

playing around with Rails 7 and import maps. Trying to import a folder with some custom JS. # config/importmap.rb pin_all_from "app/javascript/custom", under: "

there is any answer for image upload error in rails?

when i upload the i got this error in rails application ActiveSupport::MessageVerifier::InvalidSignature (ActiveSupport::MessageVerifier::InvalidSignature): i

Problems with same query in mongoid rails db but different parameters

I’m using mongoid gem ’mongoid’, ’~> 7.2.4’ (mongoDB 3.6) with rails (5) and I have a database with customer collections and bi

psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: database "myname" does not exist

I a rails app running on my local environment using postgresql. This morning I spun up a new one and after install the pg gem, etc. I am running into the follow

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

Error while creating project on ruby on rails

I am new to ruby on rails hence when i am trying to create new project by following command: rails new abc I am getting following error rails aborted! Psych::Ba

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

Active Admin login not working (Devise + ActiveAdmin + Devise JWT)

I'm using rails in API mode, with Devise and Devise JWT (for the API), and ActiveAdmin. I had everything working but I've been building out the API controllers

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 Active Storage: How to create "named variants" that are cropped by user-supplied coordinates

I have something like: class User < ApplicationRecord has_one_attached :avatar do |attachable| attachable.variant :large, resize_to_limit: [300, nil]

Mongo::Error::UnsupportedFeatures (Server at (localhost:27017) reports wire version (2), but this version of the Ruby driver requires at least (6).)

I'm trying to upgrade Mongoid in an Rails 4.2 app from 4.x to 5.x (5.4.1) to connect to a MongoDB 2.6. I've updated the mongoid.yml file to match the difference

Javascript doesn't Run Without Refresh After Submitting Form Using Turbolinks

I have some javascript that puts click handlers on buttons (for instance). Since those buttons don't exist when the user first visits the app at, say, the "Home

Is Ruby on Rails getting started guide up to date?

I'm trying to learn ruby on rails from the official website guide, and I copy paste almost all code but some seems not working. like this on for exemple, I get