Questions tagged as 'ruby'

6
answers

Localhost in rails does not show CSS

I already link the css with the html but even so the page does not show the css settings, only the html ... I am working with rails.     
asked by 07.03.2017 / 20:08
1
answer

Calculate values from one table to another

I would like to know how I can calculate the "used" and "quantity" values of two models that I generated earlier called bidon and control . This is the schema create_table "bidons", force: :cascade do |t| t.integer "usado" t.datetime "c...
asked by 03.11.2016 / 19:11
3
answers

Problem Ruby on rails with missing dependencies

I'm starting to work with Ruby on rails on ubuntu 14.04. When doing $ bundle install I get the following error: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue. Make sure that 'gem install sqlite3 -v '1.3.11...
asked by 03.04.2016 / 02:51
3
answers

Send email depending on the date

I'm doing a small agenda in Ruby on Rails, I currently use UserMailer to send emails, but I can not find the way to send mail according to the date of my created event. For example, if I create an event in my calendar today for 3 days, I woul...
asked by 19.09.2016 / 17:52
1
answer

Ruby On Rails - Update method does not work

I am having problems with the Destroy method of my RoR application. Having a list of restaurants, and wanting to modify one of them by clicking Edit, all my entries are modified when I only want to modify the selected one. Here's my code:...
asked by 17.01.2017 / 15:37
1
answer

How can I create a matrix in ruby?

I have a question about ruby, I still can not figure out how to use a matrix. In java I can do this: int matriz[][] = new int[3][3] and to get a matrix by keyboard I go through two for matrix[i][j] = dato . Now I want to implement...
asked by 19.02.2017 / 18:03
2
answers

Update quantity of a model from another

I am working on a project where there is a Stock of Bidons (Drums) , but I would like to edit the main Stock of this when that Stock is taken in another model , for example when you make a purchase of a main product and this Stock is subtrac...
asked by 18.10.2016 / 12:04
1
answer

Problem to update a hash array

Good morning, I have a problem creating a form that allows me to update several models, I'm using the create method to update the models, the detail is that the form sends me the parameters belonging to a payment arrangement (payrolls) , one lin...
asked by 27.05.2017 / 19:01
1
answer

Generate ruby tests

Trying to generate test in Ruby , specifically in my file _client_test.rb_ like this: require 'test_helper' class ClienteTest < ActiveSupport::TestCase test "no guardar un cliente sin nombre" do cliente = Cliente.new asse...
asked by 30.07.2018 / 17:51
1
answer

[ao] is the same as (a | o)? Regular expressions

I'm studying regular expressions, I've noticed that perr[ao] and perr(a|o) are equivalent. Here comes my doubt (which surely is a bullshit), is there no difference in this regard? That is, by writing less, could I use perr[ao...
asked by 02.07.2018 / 22:08