Questions tagged as 'ruby-on-rails'

0
answers

Use STI with Devise

I'm using (or trying to use) STI with Devise . I have the User model (I added the type attribute), which I want to be the devise model and two models that inherit from user. I chose this approach and not just roles because the model...
asked by 04.09.2018 / 03:12
0
answers

RubyMine Configuration Autocomplete

Hello I need to configure my IDE so that autocomplete functions are effective. When I ask for user input for example, IDE does not provide similar functions to complete, it only suggests variables already in the code. EX:    = begin...
asked by 30.08.2018 / 19:59
0
answers

Understanding optional: true in one-to-many relationship in Rails 5

It has a one-to-many relationship and I can only create a child object if you use optional: true. I know it solves but I do not understand the need! In my seeds.rb I have a block of type 3.times do |n| Parent.last.children.create!( na...
asked by 05.08.2018 / 04:44
1
answer

Problem with require in Ruby

I am studying for the book "Ruby learn to program in the most amusing Language" of the author "Lucas Souza" editor "House of the code". In my requirements file when I try to run the following error: Traceback (most recent call last): 6:...
asked by 01.08.2018 / 22:16
1
answer

Error creating database in postgres using Ruby On Rails on windows 7

When you run the command on the terminal to create the Rails project database in Postgres: $ rails db:create I get this bug that I can not resolve for some time: rails aborted! LoadError: cannot load such file -- 2.5/pg_ext Caused by: L...
asked by 09.08.2018 / 19:01
1
answer

Autocomplete of gems in text editor

Personal is it possible to get an autocomplete experience in some free text editor, similar to what Rubymine does by indexing the gems code? I tried several alternatives in vscode, how to use cTag, but I can only go to the definition of gem (ope...
asked by 30.07.2018 / 16:57
0
answers

Two tables of "type / name" Category

My question is about how the convention of creating the database would be, in my case I have a "Service" table that connects to a "Category" table. Now I need to create a "Product" table that will also connect to a "Category" table. The tw...
asked by 01.08.2018 / 16:10
0
answers

How to broadcast an FM radio on my site?

A customer wants a system for their radio where their program will be broadcast, similar to this one . I've never done anything like this and would like to know how I put this player on the site. I develop using Rails. I researched but could no...
asked by 09.07.2018 / 21:48
2
answers

set shell user to call script in rails

I need to call a shell script from rails, with a specific shell user. Example: update_response = '#{deploy_dir}/./update.sh' By default my system is using root. I would like to know, given this example, if you have how to specify the...
asked by 03.07.2018 / 15:35
1
answer

Heroku Rails 4 assets do not load

After I deploy these files below are not being loaded. Thisismydirectory Thisismyapplication.rb Heretheyarebeingcalled<%=stylesheet_link_tag"home" %> <%= javascript_include_tag "home" %> <img class="client" src="<%= asset_...
asked by 28.06.2018 / 19:22