Questions tagged as 'ruby-on-rails'

1
answer

Error installing gem pg

I'm having this error while running bundle install    "An error occurred while installing pg (0.21.0), and Bundler can not continue.   Make sure that 'gem install pg -v' 0.21.0 '' succeeds before bundling.   In Gemfile: " This is th...
asked by 05.12.2017 / 01:53
1
answer

Ruby on Rails - Upload files

I currently have a requirement to allow the user to upload PDF and DOCX files in my size limiting application. How can I develop this functionality using Rails? Physical files will be saved to the AWS cloud, and I just want to keep the file i...
asked by 13.01.2018 / 11:39
1
answer

Symbols in rails

After creating a template in rails can you change the created symbol? For example I created a template called transaction, rails creates in the plural transactions but would like to change that name for transactions is possible?     
asked by 29.09.2017 / 02:18
1
answer

Can modifying Rails default primary keys cause a problem?

By default, Rails generates the id field for all my tables, and I'd like to know if it might generate an error in the future if I change the name and type of the key. I ask this because I realized that Rails has some naming conventions that shou...
asked by 05.09.2017 / 01:01
1
answer

Show User Logged in rails_admin dashboard

Good afternoon everyone, I am developing a project in rails 5 using devise, cancancan and rails_admin, what happens is the following, I created some types of users, among them I mention admin users (has full manager permission on cancancan), and...
asked by 06.10.2017 / 18:23
1
answer

Rails. Uncaught ReferenceError: jQuery is not defined

I'm implementing a portion of notifications in a rails project, from a tutorial and I'm getting this error. Uncaught ReferenceError: jQuery is not defined at notifications.self-3e6330e4ab7198d8dee61da361c9c6cd1a536fd445b9ce4b6792ea023705a...
asked by 31.08.2017 / 17:46
1
answer

Testing in RSpec failing because of DatabaseCleaner

I was having trouble with tests about 4 days ago. At first I had a problem with "database is locked" and the file where DatabaseCleaner is configured; I changed two lines that used :transaction to :truncation and solved th...
asked by 21.08.2017 / 15:30
1
answer

Filter result of a collection_select based on the selection of another

I need to filter the result of neighborhoods based on the selection of a city. I have a has_many relation through the active record. Is it possible to perform this filter without submitting? In models: class Cidade < ApplicationRecord...
asked by 09.09.2017 / 20:12
1
answer

Questions about relationships in Rails "field must exists"

Good morning, I started to study rails recently and whenever I define the relationships between the entities in my database, some doubts arise. The first time, I created and defined relationships in migrations. I did this: class CreatePr...
asked by 27.07.2017 / 15:42
1
answer

In-page rendering

I'm new to rails and I'm having difficulty with RENDER I have a "_tables-client" rendering inside the page and when I order to execute a method, I want to update only the specific render and not the entire page,     
asked by 19.07.2017 / 19:18