Questions tagged as 'ruby-on-rails'

2
answers

Add new fields in migration?

Hello I'm working with Ruby On Rails, and for platform authentication I'm using gem 'devise'. I came across a situation where I need to add new fields for user registration (Date of birthday, gender, etc ...) and the device only provides me the...
asked by 25.05.2017 / 15:03
1
answer

Is there a need to declare the same dependency on Gemfile and gemspec?

I have several engines in my API, all depend on Artemis::Core . I want to understand the difference between declaring in Gemfile , for example, gem artemis-core : source 'https://rubygems.org' gem 'artemis-core', '~> 0...
asked by 17.03.2017 / 22:56
1
answer

How to run the puma server with SSL?

My Rails 5 application uses WebRTC, and WebRTC (camera, etc.) only works with SSL enabled. I use puma server locally. What are the correct procedures to enable and enable SSL support on the puma server?     
asked by 03.01.2017 / 11:34
1
answer

Ruby on Rails, form_for with 3 levels

I'm trying to create comment, through form_for of 3 levels: Article > Item > Comment Controller: def new @comment = Comment.new end I have already tried it in several ways, and all of them give error. Look at what I tried and t...
asked by 06.11.2016 / 16:35
1
answer

How could I add an ICONE inside a SELECT in HAML

Hello, I would like to add icons (from source, such as bootstrap for example) inside a select field in HAML, at first I'm doing so, would that be possible? I thought about using the bootstrap list-dropdown as a palette, but it did not work either...
asked by 27.09.2016 / 14:22
1
answer

How to execute shell script to restart server by application

I need to run a shell from rails with a small difference, I need the script to continue running even if the server process (puma) is killed. I added an update system inside my application, but I need to restart the server to work the changes....
asked by 06.09.2016 / 21:36
1
answer

Failed to install gem mysql in Linux Manjaro

It's been a while since I started playing with Ruby on Rails on Ubuntu and created some projects. Currently I installed the distro Manjaro and I installed the ruby and rails and I want to run my project created in Ubuntu, however I am facing...
asked by 31.08.2016 / 16:59
1
answer

Ruby on Rails sorting and parenting children relationship

I have a parent table and a child table, I would like to know how do I make a query in the child table but sort by a column of the parent table. I want to know all the children and sort them out by the age of the father.     
asked by 01.09.2016 / 13:52
1
answer

I would like to create an object equal to a query in the database

I would like to create an object with fields equal to that of the ActiveRecord query, but with the fields pre-filled or blank, so that they are called in the same way in the other file ... For a better example, the code snippet I def...
asked by 22.09.2016 / 22:42
1
answer

Autocomplete rails 4 + jQuery

Good afternoon, guys! I have the following scenario: a model city where all the cities of Brazil are already registered, and I have a view companies where I will register the companies and I want to create an autocomplete field for name of th...
asked by 09.08.2016 / 20:18