Skip to main content

Questions tagged [ruby-on-rails-7]

For Ruby on Rails 7 questions: Ruby on Rails 7 is a web app framework in Ruby. Use tags like [ruby-on-rails], [ruby], [rails-7], [activerecord], [actionview], [actioncontroller], [routing], [authentication], [authorization], [database], [testing], [deployment], [gems], [api], etc. Provide specific details and errors.

1 vote
1 answer
64 views

Rails Exception No Such Table Exists

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
99 views

Pagy gem: best practice to paginate a collection that comes from the model's has_many association

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
  • 126
1 vote
1 answer
96 views

Search Rails 7 ActiveStorage filename with Ransack

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,222
0 votes
1 answer
42 views

Rails 7: Downloadable files in folders outside project folder

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
  • 188
1 vote
0 answers
56 views

Javascript error running Rails 7 app on IOS iPhone/iPad

We have an app build in Rails 7 with a Postgres database and uses Bootstrap 5 for the UI components. Pretty basic but effective app. The app works fine on Windows and Mac browsers and on most Android ...
Daniel Grenier's user avatar
0 votes
0 answers
43 views

Rails JavaScript works fine only with direct URL

In my application I use javascript to manage the fields in the form. When I visit the website by entering the address directly in the browser eg http://IP:3000/admin/systems/new, the javascript ...
mila002's user avatar
  • 375
0 votes
0 answers
47 views

How to create records via FactoryBot with microservice app

I'm new to microservices, always worked with monoliths. I have an application with microservice architecture. The database is located in the part of app in a gem and is accessed through: ...
Procy's user avatar
  • 57
0 votes
0 answers
77 views

Getting "No loader is configured for ".svg" files" while adding custom plugins in ckeditor5

I am using @ckeditor/ckeditor5-build-classic in my Rails 7 application without webpack configuration. the Classic Editor is working fine, but when I use the plugins (like: @ckeditor/ckeditor5-source-...
Sushant Kumar's user avatar
0 votes
1 answer
17 views

Blocking the possibility of logging in if the user is not in the database - Rails Devise

I'm using Devise and devise_ldap_authenticatable to allow users to login. I'm using only session controller class Users::SessionsController < Devise::SessionsController layout 'landing' ...
mila002's user avatar
  • 375
0 votes
1 answer
48 views

default session expiry issue on Rails

I have an application running in production mode. After a while, the session data seems to clear out. Currently I am using vanilla Rails 7.1.1. What could be causing this? I want session data to stick ...
Michael Ding's user avatar
0 votes
2 answers
56 views

Rails 7: How to include a nested assosiation in a jsonapi-serializer

I have an author that has many books and a book that belongs to an author in an rails 7 api. I am using "jsonapi-serializer", "~> 2.2" to try and get the author and their books. ...
Ese10's user avatar
  • 19
1 vote
1 answer
247 views

Getting bootsnap error when using 3.3.1 ruby versions

I am updating ruby version from 3.0.6 to 3.3.1 and bundle run successfully but when try to run rails server or rails c ,getting this error **"**ArgumentError: comparison of String with nil failed ...
Ashish Bhagore's user avatar
-1 votes
1 answer
75 views

Rspec on Docker with database_cleaner causes remote URL error: RemoteDatabaseUrl

I'm working in Docker, trying to run bundle exec rspec ./spec/services/something/something_spec.rb and I am getting this error DatabaseCleaner::Safeguard::Error::RemoteDatabaseUrl: ENV['DATABASE_URL'] ...
Jose Paez's user avatar
  • 779
0 votes
1 answer
33 views

rollback database in local doesn't update postgres in server Rails 7

I'm running Rails 7 on my server, even though when I add a new table, it does migrate and I can see it in the server database. But when I made changes by rolling back in development environment, and ...
John Sall's user avatar
  • 1,107
1 vote
0 answers
98 views

Getting randomly PG::Error: can't open large object with rails application

I have a rails application using postgresql 16, i am using latest version 1.5.6 of pg gem. I have the below method:- def file_length transaction do lo = active_connection.lo_open(self.oid, ...
Sachin Singh's user avatar
  • 7,167

15 30 50 per page
1 2
3
4 5
68