Questions tagged as 'ruby'

1
answer

NoMethodError in Welcome # index Ruby On Rails

I'm doing a blog in Ruby on Rails and I have this error:    NoMethodError in Welcome # index       undefined method 'each' for nil: NilClass <% @articles.each do |article| %> <h1><%= article.title %></h1> <...
asked by 10.07.2017 / 07:27
1
answer

Error starting the Ruby on Rails server with 'rails s', in Linux Mint, by console (Bundler Error Backtrace)

What I try to do is start my ruby on rails server with rails s , but in the linux console I get the following errors: /usr/local/rvm/gems/ruby-2.4.0/gems/rake-11.2.2/lib/rake/ext/fixnum.rb:4: warning: constant ::Fixnum is deprecated /usr...
asked by 29.05.2017 / 20:29
2
answers

warning when running the bundle install command

I have just installed Rails in its version 5.1 and when creating a new project and run the command bundle install me the following message. The dependency tzinfo-data (> = 0) will be unused by any of the platforms Bundler is installing fo...
asked by 30.05.2017 / 20:14
2
answers

Error raising Server in Ruby on Rails

After starting my project from the specified path and executing the rails s command, I get the following error: Could not find gem 'tzinfo-data (>= 0) x86-mins machine. Run 'bundle install' to install missing gems. I modified the...
asked by 15.11.2016 / 22:33
1
answer

links in ruby rails

because when I browse the links on my page, do not you upload everything completely? example : I have a dropdown in my navbar, if I enter "/" if I can open them but if I click on a link when I load the page it can not be, in console I d...
asked by 24.08.2016 / 20:48
2
answers

Error in the creation of new post in rails

I am creating an application in rails in which a freelance has a has_one association with a service. the app is running well until you have to create a new service as a freelancer. when I create a new post I get the error. I did a test leavin...
asked by 07.12.2018 / 17:54
1
answer

Try and Except in ruby

I'm learning how to program in ruby, my main language is python, so I was hesitant if there is any equivalent to try and except for python in ruby: try: print("No hubo errores") except: print("Si hubo errores") Is there something si...
asked by 10.07.2018 / 18:09
2
answers

How do I get the highest value in a Ruby hash?

I have this hash, meses_ventas = {'Enero' => 2000, 'Febrero' => 3000, 'Marzo' => 1000, 'Abril' => 5000, 'Mayo' => 4000} And I need to get the highest value among all the values. It turns out that I try to iterate it with each...
asked by 03.05.2018 / 04:52
2
answers

database.yml rails 5

Why do I get an error? I'm doing the deploy for production. thanks database.yml production: adapter: mysql2 encoding: utf8 database: trabajo username: root password: 987654 host: localhost port: 3306...
asked by 16.11.2017 / 18:09
1
answer

Update a selectbox using ajax

I'm trying to update a select box after creating a regristro from another controller (called "catgrupo" creating categories), but I'm getting the following error: ActionView::Template::Error (undefined local variable or method 'f' for #<#&l...
asked by 15.01.2017 / 20:13