Questions tagged as 'ruby-on-rails'

3
answers

Running my AngularJS application on some server

I have a front end application consuming an api rails, but I'm new to this idea of separating the front end from the back end, my api runs on localhost: 3000, and my front is simply a folder that I go there manually and open my html page, I want...
asked by 25.09.2015 / 14:02
2
answers

Rails 4: Changing the "development" database from PostgreSQL to SQLite3 causes the rails server to give error

Hello. For some reasons, I had to change my DB "development" from PostgreSQL rails back to SQLite3. The page has stopped working and the error that appears in the rails server output is this: Started GET "/" for 127.0.0.1 at 2014-04-08 15:1...
asked by 08.04.2014 / 20:30
1
answer

Statistic in Ruby on Rails

I have the following problem, I need my system to generate some statistical data from a vector, for example: vetor = [1, 5, 2, 1, 6, 30, 2, 7, 2, 80] I need to extract some data from it, like: Medium Medium Fashion Minimum...
asked by 07.08.2014 / 13:43
1
answer

How to prevent a simple query from locking the entire MySQL database

I have an application in Rails that uses a MySQL database with a table with millions of rows. Sometimes it happens that some part of my application does a very heavy query, locking all the rest of the application. How do I prevent these pesky qu...
asked by 13.08.2014 / 02:53
3
answers

Many to Many JSON POST - Rails 5 - Only API

Hello, I'm developing an Engine in Rails 5 where it will be just a blog API. It will be a simple system. Post has several Passions and Passions has several Posts. I made the N < - > The problem is that when sending the JSON of the post...
asked by 29.03.2017 / 13:28
1
answer

How to render a partials structure from another directory in Rails?

1) Views structure Assuming I have two sets of views, set A and set B. Both sets are similar having the view index.html.erb and the partials _index.html.erb , _new.html.erb , _edit.html.erb , _table.html.erb...
asked by 21.10.2015 / 15:50
1
answer

Migration to Heroku

I am migrating the DB from my app to Heroku , deploy worked: $ git push heroku master When trying to migrate the database according to the command $ heroku run rake db:migrate does not work and returns the followi...
asked by 25.02.2015 / 17:35
1
answer

UML Questions for System in Rails

My question is the following. Rails controllers for basic CRUD operations require several methods that are repeated throughout the application's controllers. I'm drawing the diagrams for a CBT application that has several CRUD's, and so I'm find...
asked by 07.07.2014 / 01:00
1
answer

Ruby-on-rails insert / uptade external program

I'm studying a bit of Rails for a new project and a question arose that is: When I give db:migrate , Rails creates / changes the entire database structure - when needed - based on the template. From what I've seen, rake creates some v...
asked by 15.04.2014 / 19:31
1
answer

strong_parameters in Rails using datetime

I am using strong_parameters to create a nested form object in a form . All my attributes work correctly, except those defined in datetime . Is there anything special about receiving datetime nested? Looking at th...
asked by 31.03.2014 / 17:22