Questions tagged as 'ruby-on-rails'

1
answer

Show all objects, except those belonging to the logged in user

Good afternoon, I'm doing a web system where the user can register several dogs, my question is how do I show all dogs in the system, except what is registered by the logged in user? class PetsController < ApplicationController before_act...
asked by 16.07.2018 / 19:51
0
answers

Problem with rails command db: create undefined symbol: rb_enc_alias

When I create a project (from scratch) I then give the comado rails db: create to create the database and I get this error: LoadError: /var/lib/gems/2.3.0/gems/pg-1.1.0/lib/pg_ext.so: undefined symbol: rb_enc_alias - /var/lib/gems/2.3.0/gems/...
asked by 27.08.2018 / 23:00
2
answers

How to put the average in the last table in Rails

I have the following question:
asked by 08.06.2018 / 07:11
1
answer

NoMethodError: undefined method 'production' for "development": ActiveSupport :: StringInquirer

I do not understand why you are not migrating. deploy@vps8029:/var/www/maisonconvite$ rails db:drop db:create db:migrate db:seed rails aborted! NoMethodError: undefined method 'production' for "development":ActiveSupport::StringInquirer /home...
asked by 22.05.2018 / 03:59
1
answer

Rails inheritance

I'm starting in the area, I have the following scenario in my back end done in rails: I want to implement a parent class: Equipment: ID PK Brand ... And some child classes Printer: ID_EQUIPMENT PK and FK ... Computers: ID_EQUIPMENT P...
asked by 18.05.2018 / 20:53
1
answer

Rails CanCanCan - Questions about Roles table

Good afternoon, I have the following models: User.rb class User < ApplicationRecord # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable,...
asked by 18.05.2018 / 20:41
0
answers

Wizard progress bar works only after page refresh

When integrating the twitter bootstrap wizard with my application, I noticed that the progress bar works only when I refresh the page. I have seen in some places that this can be caused by turbolinks but I have not found any solution to the prob...
asked by 13.11.2017 / 00:56
1
answer

Ruby on Rails SQLite3 :: BusyException: database is locked: INSERT INTO

Hello, I'm facing a problem with SQLite3. When I run the code: user = SystemUser.new(email: "[email protected]", password: "marcos123") user.profile = Profile.new(first_name: "Marcos") user.save Rails runs in SQLite: (0.1ms) begin trans...
asked by 13.11.2017 / 00:33
1
answer

Undefined method in Ruby

I'm trying to make a relationship between two tables in Ruby, where I use the student and notes but when I go into localhost: 3000 / students / 1 / notes it gives me the error
asked by 10.11.2017 / 16:10
0
answers

"\ xED" followed by "t" on UTF-8

I have a rails application and when I run or compile the assets it gives the following error: "\ xED" followed by "t" on UTF-8 In my    application.rb I already have this key: config.encoding = "utf-8" Does anyone know what it c...
asked by 21.11.2017 / 18:13