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.

0
votes
0answers
3 views

Searchkick End of File Reached

In my Rails 7.0.1 app with Ruby 3.0.3 I get this error when performing a search with SearchKick: 19:13:13 web.1 | Started GET "/search?q=nemesis" for ::1 at 2022-01-24 19:13:13 +0000 19:...
0
votes
0answers
7 views

Your Ruby version is 2.7.0, but your Gemfile specified 2.6.3 but I have ruby 2.6.3 installed

So my gemfile specifies ruby '2.6.3' and I used rbenv to install ruby 2.6.3. However, when I try to run rake db:create, it gives me an "Your Ruby version is 2.7.0, but your Gemfile specified 2.6....
0
votes
1answer
13 views

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::BadAlias: Unknown alias: default /home/...
0
votes
0answers
4 views

Facebook oAuth execution expired

I'm using Rails 5 with Ruby 2.3.1 and following gems: gem 'omniauth' gem 'omniauth-facebook' gem "omniauth-rails_csrf_protection" I have Facebook app that passed App Review and it's live. ...
0
votes
0answers
4 views

How to determine which model of the same name a Draper decorator delegates to?

I generated a decorator to separate out a controller's logic and refactor the key-value pair (hash) in a "def attributes" method to send back to the controller for render json. However, ...
0
votes
0answers
8 views

Cannot reach the password of the user after assigning it - RSpec

I am trying to write system tests. I want to run a classic login page test. I have a field for email, password, and submit button. It is working in production env and alive without any problem. my ...
0
votes
2answers
17 views

How to remove the text from the table at the end of displaying table data

I'm not really sure how to quote this question, but I'm making a clone of Reddit in Ruby on Rails. On the index page I am displaying all of the posts I have in the table "Posts". But when I ...
0
votes
0answers
13 views

omniauth-facebook request.env['omniauth.auth'] is nil [DUPLICATED]

I have been looking for the solution but got no any luck, have searched alot and tried many solutions found on stackoverflow or github issues... but still same error.. Referring to this post I tried, ...
0
votes
0answers
8 views

How do I set up sending notifications in Rails for Firebase Cloud Messaging?

I have a Rails application that needs to send a notification to Firebase. Searching led me to the only solution - using the rpush gem. But I absolutely do not understand how to set it up for Firebase. ...
0
votes
1answer
30 views

Can someone explain me why I can't use in model two has_many through?

I am new at Ruby on Rails. And I do not understand, why there are can be only one has_many through in model? class Physician < ApplicationRecord has_many :appointments has_many :patients, ...
0
votes
1answer
20 views

how to permit the parameters for bulk creation with has_many association records in rails

{ "people": [ { "last_name": "batch_person_one", "addresses":[{ "address_type": "active" ...
0
votes
0answers
10 views

Active Admin strip form input

Is it possible to strip forms' input fields in Rails Active Admin? e.g: form do |f| f.inputs do f.input :attr, as: :string end end I tried string_options to copy datepicker_options ...
0
votes
1answer
10 views

Rails/MongoDB: How to query mongodb model with string to date typecast?

I have a rails mongoid model with a string field end_date as follows class Project include Mongoid::Document include Mongoid::Attributes::Dynamic include Mongoid::Timestamps field :end_date, ...
0
votes
1answer
17 views

Import data from Mongo to Elasticsearch on Rails

I use MongoDB to store information about products. Every product has a title (string), description(string), etc My Gemfile ruby '3.1.0' gem 'mongoid', '~> 7.3.0' gem 'carrierwave-mongoid', :require ...
0
votes
0answers
20 views

Unable to get relative path from root to img src in rails application

I have a small rails application in which if the environment is development, I am storing images locally. I can see that the image is successfully being uploaded but for some reason when I use the ...

15 30 50 per page
1
2 3 4 5
22013