Questions tagged [ruby-on-rails]

Ruby on Rails is an open source full-stack web application framework written in Ruby. It follows the popular MVC framework model and is known for its "convention over configuration" approach to application development.

332,796 questions
0votes
0answers
7views

Getting Routing Error /stylesheets/application in Rails 7

Searched everywhere for an answer but couldn't find it. So I'm using Rails 7 and on my /app/assets/stylesheets/application.scss added @import "bootstrap";. Everything works fine but I still ...
0votes
0answers
12views

Finding an association

I am trying to query all records that are not already in an associated group. So I have four models I'm working with including a has_many through association: Account which has_one :credential and ...
0votes
1answer
15views

how to Include a module from app/lib folder

I am getting an error while trying to load a class from module which is present in app/lib folder. I had made changes according to it Controller class SchemasController < ApplicationController # ...
0votes
0answers
9views

testing graphQL mutations on rails using Rspec, resolve returns wrong number of arguments

I'm trying to test graphQL mutations but I couldn't solve the error. I want to create a book for each author # book_type.rb module ApiTypes class BookType < BaseObject field :id, ID, null: ...
1vote
0answers
21views

Call Method in ApplicationController from Gem

I have a Gem that handles authentication of users via a third party, and want to sign in a specific user using Devise, through a method in the Application Controller. I need to pass information about ...
-1votes
1answer
18views

question id is not changing for user_choice

Here is my question.controller class QuestionsController < ApplicationController def index @questions = Question.all end def new @question=Question.new end ...
0votes
0answers
9views

I am using open flash chart but getting error in the view page

I am using open flash chart but getting error in the view page swfobject.embedSWF("/open-flash-chart.swf", "flash_content_tfhGcVUM", "880", "450", "9.0.0", "expressInstall.swf",{"data-file":"http%3A%...
0votes
0answers
21views

Share code between specs that are very similar to each other with rspec

Share code between specs that are very similar to each other (ex: a request spec of an action that doesn't do anything other than calling a service object and the spec of the service object itself) I ...
  • 7,460
0votes
0answers
7views

Ruby on Rails Searchkick::Error (Relation loaded)

i've just read about searchkick and this is what happened. Please help me, i've searched for a solution but there's nothing. Company Search (19.4ms) companies_development/_search {"query":{&...
0votes
0answers
9views

Rails stimulus-autocomplete Errors - Uncaught Error: Module parse failed - Static Targets

I'm still relatively new to the Rails game, but I was wondering whether anyone could assist with a problem that I have. I wanted to implement [stimulus-autocomplete][1] into my rails 6 app, but when I ...
0votes
0answers
8views

How to join 2 queries in Arel, one being an aggregation of the other (Rails 5.2.4)?

My application monitors ProductionJobs, derived from BusinessProcesses in successive versions. Thus the unique key of ProductionJob class is composed of business_process_id and version fields. ...
0votes
0answers
11views

Jquery libraries not being imported on a rails app

All of a sudden all JQuery related libraries are failing in my app for example: Uncaught TypeError: $(...).starRating is not a function
0votes
1answer
33views

elasticsearch-6.8.13, Multi Match Range Query is not working

I am using the ElasticSearch custom DSLs & want to use the query to find the accommodations that have adults gte [:adults] & lte [:perfect_adults]. Its not working even if we used the static ...
0votes
0answers
8views

Error running 'requirements_debian_libs_install libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libyaml-dev zlib1g-dev libgmp-dev libreadline-de

running script: $rvm install ruby. Tried some similar solutions and installed the packages manually using: eg: for the library. $ sudo apt update && apt-cache policy libncurses5-dev and it ...
0votes
1answer
27views

My Delete method is not working, after disabling "Turbo" in rails 7?

I am working on rails 7. I'm trying to run my 'Delete' method after disabling 'Turbo' but its not working, it keeps getting to my 'show.html.erb' file instead of deleting the specific data. Here is my ...

153050per page