Most voted "ruby-on-rails" questions
Ruby on Rails is an open source web development framework written in Ruby. Allows the developer to write source code following the MVC model and is known for its "convention on configuration" approach to application development.
Learn more…779 questions
Sort by count of
-
-1
votes1
answer403
viewsCreate application for two different profiles
I am working on an application that has two different types of profiles and I want to find the best way to structure my application being that: All Urls in my app will start with one of the two…
ruby-on-railsasked 10 years, 3 months ago Ruby Dev Junior 51 -
-1
votes2
answers203
viewsApp novice. Where to start?
Hello. I have been developing with Ruby on Rails and PHP for some time. I would like to create an application now... I wanted to start from the point I already know, that is, use one of these two…
-
-1
votes1
answer883
viewsHow to call a method with named parameters using a hash
I wonder if you have how to pass parameters to a parameter method named via hash. It has to pass the parameters that remain for another function as in the following example? params = {key:…
-
-1
votes1
answer211
viewsvalidation of a field from another table in a specific model
It is possible to validate the field of another table that is related in a specific model? For example, I need to validate an email field in a table Requests, but only emails from anyone who is an…
ruby-on-railsasked 9 years, 8 months ago Cesar 1 -
-1
votes1
answer264
viewsClass Person > Legal person > Natural person. Rails 4
I’m developing a APP in Rails, and I came up with the following question regarding the class Person. The structure of these classes are like this: Pessoa { tipo, status } PessoaJuridica {…
-
-1
votes2
answers300
viewsHow to delete a BD data from the Ubuntu terminal? Ruby on Rails
I scaffed the Rails... okay. Now I’m using Gem paranoia to give a software delete, but that’s it, how do I give the command for example this, in a post mine? Which way...
-
-1
votes1
answer154
viewsRails link to dynamic
I have the following question, in my controller has a variable that takes which model the guy is coming and sends to the view. I would like to create a link from this variable type: link_to…
-
-1
votes1
answer34
viewsSearch inside another Rails scaffold
I have a problem, an example created two scaffold book and loan, then created a controller and an index called report : rails generate controller RelatoriosEmprestimos index I want to do specific…
-
-1
votes1
answer47
viewsLeave a specific option selected when using a select
I am generating a select passing some options as shown in the code below select name="listing_search[realty_types][]" - Realty.translated_realty_types.each do |k, v| option value="#{v}" #{k} How do…
-
-1
votes1
answer116
viewsPATCH and PUT Rails
I am doing a test for an internship where I have an api and in this api I have to have the PUT method to change a user’s data by the id and a PATCH method that changes the partial data of a user but…
-
-1
votes1
answer57
viewsHelp with a Ruby on Rails query
Good afternoon, I just started working with Rails and I’m having trouble with a query. I’m building an Api where I have the Game model and the User model. A user has several games, and one game has…
-
-1
votes1
answer12
viewsRuby Gem carrierwave-ftp in Heroku returns Net error::Ftppermerror (500 I won’t open a Connection to
I am using Gem carrierwave-ftp and dev localhost works normal but in Heroku it resumes the error below: Net::Ftppermerror (500 I won’t open a Connection to xxx.xxx.xxx (only to zzz.zzz.zzz. ) Below…
-
-1
votes1
answer60
viewsHow to access the local Rails puma server inside a Docker container?
I’ll try to be as clear as I can. To put it in context: I have an application that has tests written in Capybara and that connects remotely to a Docker container to run the tests. As I use the WSL,…
-
-1
votes1
answer132
viewsUndefined method `+' for nil:Nilclass - Ruby on Rails
I need help to solve this problem: Undefined method `+' for nil:Nilclass - Ruby on Rails #contabilização de todos os contratos @stat['RCS'] = {} produtos.all.each do |ps| if not…
-
-1
votes1
answer20
viewsLoop Redirect Error in Rails application
I am working on an application in Rails and doing tests via Postman, the application usually works normally after having logged in some user, I can test the endpoints correctly. But when I stay with…
-
-2
votes1
answer151
viewsError while initializing Redmine
After making the modification in one of my plugins in development in Redmine , it can no longer initialize and returns me the following message: ActionView::Template::Error (can not load…
-
-2
votes2
answers413
viewsAlternatives for Rails server and deploy applications
Whenever I make a Rails application I configure my server with Nginx and Passenger, and usually I do deploy via GIT or rsync. I know there are other ways to do deploy and also server configuration.…
-
-2
votes1
answer181
viewsHow to cover testing in Rails applications already completed?
TDD is usually used during development. But what about when you walk into a company, get the code all messed up and see the urgent need for improvement and of course, test coverage? How to proceed?…
-
-2
votes1
answer398
viewsCreate system access levels
Guys, this question starts from scratch. I want to know how to determine system access rules where there are 3 types of profiles: general administrator, local administrator and maintainer, where…
-
-2
votes2
answers555
viewsHow to use for in Ruby?
I can’t use the for equal use in the Java. I am trying to find out if a die is addicted. An honest casino owner launched it n times, given the n Launch results, determine the number of occurrences…
-
-2
votes1
answer34
viewsSass::Syntaxerror - Properties are only allowed Within Rules, Directives, mixin includes, or other properties
When trying to access the site, this error appears: Properties are only allowed Within Rules, Directives, mixin includes, or other properties. https://pastebin.com/LqMyVEM5 (Sass file code) My…
-
-2
votes0
answers17
viewsIs it possible to fix a command I missed by the terminal in Ruby on Rails?
While testing Ruby on Rails I missed the name of my table in the database when referencing it in a fk, in addition to declaring a field called "age" I typed "agr" and gave enter, I tried to tidy…
ruby-on-railsasked 3 years, 3 months ago Jonas Bezerra 1 -
-2
votes1
answer172
views400 Bad Request "Forbidden"
I am testing Jasmin through demo version and already created the application and corresponding subscription in Nitrogen. Through the Postman examples of the Github repository, I can already get the…
-
-2
votes2
answers241
viewsHow I present the data that is in the other table in the view. Rails 5
I have a form that has fields from two different tables Patients table and Addresses table. However I did a search field to just search a patient(Patient) and return his data, until the fields of…
ruby-on-railsasked 4 years, 8 months ago Thomaz Wanderbruck Schmidt 1 -
-2
votes2
answers120
viewsRails API Using Gem PUMA Development Environment >> Production
I have developed an API that connects in an oracle database is working properly in development, but when I try to run the GEM Puma in production, it gives error. command to execute *** SIGUSR2 not…
-
-2
votes3
answers108
viewsReturn error message when split by 0 - Ruby
All right? I’m doing a challenge on Ruby and the def’s need to be the way it is in the code I’m gonna send. The division by 0 needs to return with the message "Oops! Zero as divisor" I’ve been…
-
-3
votes2
answers778
viewsNode.js, Ror or PHP?
Guys so far I only studied front-end, but I want now I want to make a complete application and for that I need knowledge to program the server. I see several options of languages and frameworks and…
-
-3
votes1
answer134
viewsRun a Ruby on Rails application locally Heroku
I have a Ruby on Rails app hosted on Heroku. It has a login system on the home screen that redirects the customer (in this case me) to the other features of the account. When I run it locally, (be…
-
-3
votes1
answer38
viewsI am not able to solve this error of syntax,
class Sale < ApplicationRecord belongs_to :client belongs_to :user belongs_to :discount has_many :product_quantities has_one :comission after_save do calc = 0 # Soma o preço dos produtos vezes a…