Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
47 views

I have a simple has_many through: table class User < ApplicationRecord has_many :memberships end class Membership < ApplicationRecord enum :status, [:inactive, :active] belongs_to :user ...
vince's user avatar
  • 2,978
0 votes
1 answer
1k views

In my Rails 7 app, I'm trying to make a link_to trigger a normal POST request, but it always ends up sending a Turbo Stream request. I've tried disabling Turbo by adding data: { turbo: false }, but ...
Tiago Antunes's user avatar
0 votes
0 answers
133 views

I have a Rails application on cloud run with an endpoint called by our apps to determine if their version is current and if not, requires a download. This is a simple, one record read of the database ...
Daniel McCarty's user avatar
5 votes
1 answer
976 views

We've been looking to upgrade to Rails 7.2.0 and we're getting a new error in MiniTest (v 5.24.1). ArgumentError: assert_no_enqueued_jobs requires the Active Job test adapter, you're using ActiveJob::...
Phil-6's user avatar
  • 853
1 vote
1 answer
415 views

I had an alias for reload! command in the rails console: # ~/.irbrc if defined? Rails def r reload! end end In rails v7.2 this no longer works: >> r (stackoverflow):1:in `<main>':...
Alex's user avatar
  • 31.3k
1 vote
1 answer
332 views

I have some code that I would like to automatically execute on a per-project basis when I start up rails c. In one of my Rails 6 projects, I just created a .irbrc file at the top-level of the project, ...
Ryan Pierce Williams's user avatar
0 votes
0 answers
256 views

In Rails 7.2, they introduce Article.current_transaction.after_commit, saying "for code that may run either inside or outside a transaction and needs to perform work after the state changes have ...
Mohamed Hafez's user avatar
0 votes
0 answers
55 views

I am trying to upgrade a project from Rails 6 to Rails 7. Gemfile ruby '3.1.2' gem 'rails', '7.0.4' gem "sassc-rails", '2.1.2' gem "sprockets-rails", "3.4.2"...
Bazley's user avatar
  • 2,867
1 vote
1 answer
124 views

I am adding some extra CSS/JS files into my vendor folder: vendor/my_theme/css/app.css vendor/my_theme/css/bundle.css vendor/my_theme/js/app.js They belong to an external theme I am integrating. I ...
fguillen's user avatar
  • 39.5k
0 votes
1 answer
62 views

I have an Elasticsearch index with an array of items that looks like: [{ ..., "_source": { "id": .... "name": "apples", "organization_size&...
Lloyd Banks's user avatar
  • 36.9k
0 votes
1 answer
203 views

in my rails Application I have the following code. class ProjectImage < ApplicationRecord belongs_to :project has_many_attached :images do |attachable| attachable.variant :...
John's user avatar
  • 1,333
0 votes
0 answers
58 views

I have a rails 7 web app, which uses redis, hiredis, redis-actionpack to store session data. We also use devise for auth. Now, I wish to use log tags to include user_id in every line the logger logs. ...
Shrinath's user avatar
  • 8,138
0 votes
0 answers
64 views

It happens only on Chrome/Firefox - on Safari everything works fine. I noticed that some requests (eg. file upload) don't work correctly after moving to turbo (from turbolinks). Request: patch https://...
Magda Sz.'s user avatar
  • 161
0 votes
0 answers
304 views

Current Rails app has ruby 3.0.0 and trying to upgrade to ruby 3.1.0. It's breaking with uninitialised constant Time::RFC2822_DAY_NAM error where it was previously working properly. That line is ...
Mansi Shah's user avatar
0 votes
1 answer
87 views

I'm trying to install apartment gem but its giving error. When I do bundle exec rails generate apartment:install it produce error undefined method `new' for "Apartment::Reloader":String (...
H.M.BILAL's user avatar
1 vote
0 answers
116 views

I am not sure how to debug Rails 7.1, redirect_to() not working vs in Rails 3.2 the same exact code works. Working Example Within Rails 3.2, I have a Controller action "logout" that contains ...
Chris's user avatar
  • 423
-1 votes
1 answer
700 views

I'm upgrading my rails app from 6.1 to 7.0 and i'm running into this runtime error: I do use the Authlogic gem, but the odd thing is i have no config/initializers file for Authlogic, and i can't find ...
weetch's user avatar
  • 139
0 votes
0 answers
644 views

I am trying to update my ruby app from ruby 2.6.6 to ruby 3.3.4 and Rail 5.1 to Rails 7.1 I know it is not a good practice to do so, but in my case (which is a bit complicated) I felt I didn't have ...
bseido's user avatar
  • 19
2 votes
0 answers
247 views

I have a very simple Rails 7.1.3.4 app that is essentially a dashboard, where it uses Turbo Streams to display model attributes in real-time. When I deploy my app to Heroku, everything works as ...
dizzy33's user avatar
  • 21
0 votes
0 answers
87 views

I was following a tutorial on how to Dockerize a brand new Rails 7 app. I made the Docker container 'distant-mirror' Setting up the Docker container took about two hours, but now I entered in my ...
Noop Noop's user avatar
0 votes
0 answers
242 views

I recently upgraded my Rails app from version 7.0.4.3 to version 7.1.3.4 and cookies.delete stopped working. I'm setting a cookie in JavaScript with: document.cookie = `last_guess=value; path=/`; ...
ptrlaszlo's user avatar
  • 337
2 votes
0 answers
134 views

Uncaught TypeError: Failed to resolve module specifier "application". Relative references must start with either "/", "./", or "../". In rails 7 while creating ...
Dev Gupta's user avatar
1 vote
1 answer
152 views

I am using latest ruby 3.3.3 and latest rails 7.1.3.4. I am new to rails and I am learning it. Sorry if my request seems dumb to some. I got this error when I run tests. It seems that ActiveRecord is ...
Ghassen Rjab's user avatar
0 votes
1 answer
354 views

In production mode, I am testing connecting a rails 7 project to a remote server for the postgresql database. However when I try to connect to it, it starts looking to connect to the postgres database ...
Ese10's user avatar
  • 19
2 votes
2 answers
287 views

Problem: I cannot paste multi-line code as pry tries to execute every line. Expected behavior: [1] pry(main)> %w[a b c] .map(&:to_sym) => [:a, :b, :c] [2] pry(main)> Actual behavior: [1] ...
Alexey Zalyotov's user avatar
2 votes
1 answer
80 views

Let's say I have a simple model like so with a presence validation on the password field. class User < ApplicationRecord validates :password, presence: true end If I try to update the password ...
Schwern's user avatar
  • 167k
0 votes
2 answers
455 views

I am trying to build a development compose.yaml to mimic what I hope to be my production deployment. Currently it looks like the following using bin/dev. services: web: build: context: ./ ...
GSP's user avatar
  • 3,789
3 votes
0 answers
309 views

How to properly use custom fonts in Rails 7 with jsbundling? I'm trying to use Fontawesome-Free and Font Lora, but I'm getting a loader error. 13:46:30 web.1 | ActionController::RoutingError (No ...
Dmitry Tolstosheev's user avatar
1 vote
1 answer
242 views

After upgrading our rails stack from 7.0 to 7.1 i noticed these weird errors of stack level too deep even without much of a stack trace. It happens as far as i noticed, only whenever i have a simple ...
Nicholas Ladefoged's user avatar
1 vote
1 answer
123 views

Asset hero_banner.jpg was not declared to be precompiled in production. Declare links to your assets in app/assets/config/manifest.js. //= link hero_banner.jpg Rails.application.config.assets.paths &...
Krapi Rastogi's user avatar
1 vote
2 answers
497 views

I have a rails 7 app and I'm trying to add hotwire functionality. I am getting an error with pinning stimulus and importing it in application.js importmap.rb pin "application" pin "@...
Fred Willmore's user avatar
1 vote
0 answers
450 views

I am working on adding javascript handling to a rails 7 app. I want to use import maps to import external libraries for turbo and stimulus. The current issue I'm having trouble with is that ...
Fred Willmore's user avatar
1 vote
1 answer
375 views

In my Rails 7 project I have been using importmap for importing JS modules. here is the config: # config/importmap pin "application", preload: true pin "@hotwired/turbo-rails", to:...
rony36's user avatar
  • 3,369
1 vote
1 answer
51 views

I have a question about a rails 7 project I’m starting. I have a controller HomeController with one action home. class HomeController < ApplicationController def home render end end I have ...
Fred Willmore's user avatar
0 votes
1 answer
37 views

I'm using Devise with Rails 7.1.3. I'm trying to implement a user configurable timeout value for session expiration, so for example Alice could set her expiration time to 12 hours and Bob could set ...
sampenguin's user avatar
1 vote
1 answer
57 views

I have implemented following validation on my model-class: class Department < ApplicationRecord has_many :employees, dependent: :destroy validates :name, presence: true, length: { minimum: 3, ...
cluster1's user avatar
  • 6,128
-3 votes
1 answer
65 views

my apologies for all the pictures I am following a tutorial by Conner Jensen(youtube) on creating an ecommerce platform using rails 7. I have run into a couple of problems whilst following this ...
Mambo Zulu's user avatar
0 votes
1 answer
74 views

I have an app built using Ruby 3.3, Rails 7 with import map and dart-sass for my asset-pipeline, the application uses bootstrap for css and coreui\coreui-admin as FE template. Saying that my error is ...
Guilherme Caixeta's user avatar
0 votes
0 answers
42 views

I am making a rails engine which has a themes folder , in app/apps/themes . When you install the gem in a host application , the user should have the ability to add a new theme depending on their ...
Krapi Rastogi's user avatar
2 votes
1 answer
935 views

Once again production deploying a rails app which is exciting. This time a Rails 7.1 app following the same guide I have before by Ralf Ebert Ruby on Rails – Deployment Tutorial. My setup is all good ...
KleinerWarden's user avatar
1 vote
1 answer
71 views

How do I turn the following if / else statement: if /_?town$/.match? name ['Springfield', 'Shelbyville', 'Kent', 'Carter', 'Benson'].sample elsif /_?state$/.match? name ['TX'].sample ...
Lloyd Banks's user avatar
  • 36.9k
0 votes
1 answer
151 views

I have a very old application written with rails 3 and need to update it to current rails 7. I am stuck with a strange problem: in lib/assets there is a file tools.rb full of functions used across ...
kranz's user avatar
  • 621
1 vote
2 answers
83 views

I am trying to follow the rails getting started guide to set up my project, but am running into an issue with setting up the nested models/controllers/views. I have Activity model and Refusal model, ...
baed's user avatar
  • 33
1 vote
1 answer
87 views

Layouts are present in app/apps/themes/default_theme/views/layouts I have a frontend controller that renders layouts of different themes based on params. For now , lets assume it renders default_theme....
Krapi Rastogi's user avatar
0 votes
1 answer
183 views

This bug is suddenly affecting all of our 3 Rails applications on Render.com. The codebase wasn't changed but the deployment suddenly stopped being successful. During the build on Render.com, ...
Darme's user avatar
  • 7,103
2 votes
1 answer
96 views

I am building an app in Ruby on Rails 7 that has Admin and User side. after configuring Devise, all of my Devise routes redirect to "home#index". how can I fix this? I inititially thought it ...
Mambo Zulu's user avatar
1 vote
1 answer
77 views

I used rails generate to scaffold a ProjectType table and a ProjectGroup table that references project type. I created a project type successfully through the browser, but when trying to create the ...
baed's user avatar
  • 33
0 votes
1 answer
732 views

In my Rails 7.1 app I have two models: Movie and Director coupled together with the many-to-many association, so I can call e.g. Director.all[index].movies to get all movies associated with this ...
mate's user avatar
  • 169
1 vote
1 answer
274 views

I have a Rails 7.1.3 app that has ActiveStorage and Ransack installed. I have a model called Upload that has_one_attached :file. I would like to search by filename, using Ransack, in the uploads/index ...
hashrocket's user avatar
  • 2,232
0 votes
1 answer
93 views

I am working on a project in which users can create PDF files and then download them. Currently, I am creating these PDFs inside "public/" folder in the project. But, I want to change the ...
Akanksha's user avatar
  • 190

1
2
3 4 5
21