338,181 questions
0
votes
1
answer
31
views
Sass error during compilation on ruby on rails. @extend rule referencing class in another file wont work in aplication restart
The error is:
SassC::SyntaxError in Devise::Sessions#new
Showing /app/app/views/layouts/application.html.erb where line # raised:
Error: The target selector was not found.
Use "@extend ....
0
votes
0
answers
33
views
Rails 8 test trying to find unknown relation
I've been trying to write model tests for my Ruby on Rails 8 + Postgres project, but even with the simplest tests I get the following error.
I've never had a table or a relationship called listing, ...
1
vote
0
answers
40
views
How to avoid checkout payment race conditions with limited stock? Rails 8
I am building an e-commerce with Rails 8 and Stripe through their API for a pottery business. These are all unique, one-off items for now and with the demand she already has, I anticipate her site ...
0
votes
0
answers
77
views
rails 8 error: Uncaught SyntaxError: import declarations may only appear at top level of a module
I have a new Rails 8 application built with Bootstrap, Ruby 3.4.7, MySQL, and Haml, running in Firefox 145.
It all looks good, except for the uncaught exception:
Uncaught SyntaxError: import ...
0
votes
0
answers
49
views
Rails App, Auto loading files during initiliase phase
I have a Rails 8 app that is pretty bare boned.
I'm just setting up my dependency injection container, which registers relevant services here at:
config/initializer/command_bus.rb
The issue is that I'...
-3
votes
0
answers
92
views
Error in PostgreSQL when running Rails and PostgreSQL using Docker Compose
When I run the command on docker container backend:
psql -h localhost -p 5432 -U postgres
I receive the following error:
psql: error: connection to server at "localhost" (::1), port 5432 ...
0
votes
0
answers
50
views
MiniMagick/ImageMagick produces Grayscale PDFs(contains colourful images) inside Docker, but Color PDFs Locally (Rails 8) [closed]
The Problem Statement
My Rails 8 application uses MiniMagick to composite multiple color JPEG/PNG images onto a single blank page, draw bounding boxes, and output the result as a PDF.
When running the ...
0
votes
1
answer
48
views
Assertions for travel_to with attribute-based timezone
At 10 a.m. an object becomes active and visible to the user.
seconds_since_midnight.to_i at 10:00 is 36000, but that is not timezone aware.
application_controller sets a tenant and its timezone, based ...
0
votes
0
answers
54
views
Getting Rails 6 error after upgrading from 5.2 to 6.0.6 [duplicate]
Here is the error:
bundle exec rails app:update:bin
/home/ubuntu/.rvm/gems/ruby-3.1.2/gems/activesupport-6.0.6.1/lib/active_support/logger_thread_safe_level.rb:16:in `module:LoggerThreadSafeLevel': ...
0
votes
2
answers
59
views
Can't connect to MongoDB Atlas (free tier)
I'm struggling to connect from my Rails deployment to an Atlas Cluster.
This is my MONGODB_URI:
mongodb+srv://JohnDoe:****@cluster0.*****.mongodb.net/XYZ_prod?retryWrites=true&w=majority
The ...
-1
votes
0
answers
58
views
Properly submitting array of data for a minitest
The following params are submitted in different actions the following manner
?acc_ids%5B%5D=246&acc_ids%5B%5D=247&acc_ids%5B%5D=248 with Parameters: {"acc_ids"=>["246", &...
0
votes
0
answers
52
views
How to add [page] , [topage] in the body of PDF [closed]
I am confused about generating the PDF. I have a case
Table of content
A-1 .......................................................................... 2
B-2 ..............................................
0
votes
2
answers
81
views
error installing rails - alternate installation path possible
I want to install Rails on Windows using the procedure described in the official Ruby guide.
When I enter
gem install rails
I get the error message:
Permission denied @ rb_sysopen - /var/lib/gems/3....
0
votes
1
answer
65
views
Problem with migrated rails 8 sprockets/importmap sprockets errors on app/javascript files
I upgraded an app from rails 5.2 to 8.0.4, still using sprockets to load all assets, but everything was working properly. I then added importmaps and migrated all my javascript files to importmap. I ...
0
votes
1
answer
101
views
Turbo Rails (8x) with `link_to` raises "Can't verify CSRF token authenticity"
I have a button_to tag, with data: {turbo_method: :post}
This works.
When I change it to link_to it breaks with Can't verify CSRF token authenticity.
Is this a bug? It seems that it should work ...