Questions tagged as 'ruby-on-rails'

1
answer

/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require': can not load such file - bundler (LoadError)

Hi, I'm trying to create an app with Ruby on Rails but when I create a project it gives me the following error: /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require': cannot load such file -- bundler (LoadError) from /usr/lib...
asked by 25.05.2018 / 16:33
1
answer

Problem with variable in Haml

I saw that by putting a hyphen the name of the variable and the value should be printed on the screen when you put the name in a paragraph but this happens:     
asked by 02.04.2018 / 05:38
1
answer

The operator does not exist: bigint ~~ unknown Rails 5

On the controller: @sales = Sale.where("id like ?", "%#{sales_number}%") The url I request http://localhost:3000/sales/sales/search?utf8=%E2%9C%93&sales_number=1000&button= The error PG::UndefinedFunction: ERROR: el op...
asked by 07.01.2018 / 04:57
1
answer

Rails, Plugin or gem?

Good morning, I am currently seeing how to create modules in rails to create microservices and modular apps. I have reviewed a blog where it teaches how to create a modular app in rails link After viewing the blog, the following question ar...
asked by 30.12.2017 / 13:42
1
answer

How can I validate two attributes in a rails model?

Good afternoon friends of stackoverflow. I have the following model, which is a weak table from many to many, in which I want to validate two attributes that do not repeat themselves within the table, for example: I have groups and activit...
asked by 26.01.2018 / 20:01
2
answers

How often do you have to make a migration in RAILS?

In the guides and tutorials says that when you create a model, you create a migration that you then execute with rake db:migrate . But in what other cases do you have to create a migration and execute it? When you change the model, d...
asked by 16.01.2018 / 09:07
1
answer

Error voting response in model with polymorphism

I have the following model that allows you to vote for questions and for answers with the model Vote defined as a polymorphic model. The question vote part works well for me but I do not know how to approach the voting for the answers....
asked by 27.10.2017 / 02:47
1
answer

error with other attributes in devise ruby on rails

Hello, I have an error. I have several attributes in the users table that I want to put in devise but I get this error. database create_table "users", force: :cascade do |t| t.string "name" t.string "cargo" t.stri...
asked by 23.10.2017 / 01:14
1
answer

current_user does not give me rails 5, Callbacks

Hello I want that when it is created automatically save the name and email, when the Callbacks is executed I get the following error, thanks. reunion.rb class Reunion < ApplicationRecord self.table_name = 'reuniones' belongs...
asked by 17.10.2017 / 18:29
1
answer

ruby on rails current.user devise

Hi, I want to save the user's name, auto is boolean, when the click saves auto as true and the user's name Data types : t.boolean :auto t.string :nombresoli meetings_controller.rb : def auto1 r = Reunion.find(params[:id]) r.no...
asked by 14.10.2017 / 20:37