Questions tagged as 'ruby-on-rails'

2
answers

Ruby on Rails, problem with database when displaying

I want to show the data of my rails database on the page. I have managed to show the entire database, all the information. But what I want is, that only one column appears, in this case the name information. Let me make a list of the names I...
asked by 09.05.2017 / 12:56
1
answer

How to implement a primary key in rails

What is better to use in rails for a composite primary key? Use the composite_primary_keys gem? or use an index that contains the columns that I need for the primary key? What is the best way to uniquely identify a row in a table? , which...
asked by 15.10.2017 / 15:26
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

Paginate objects from the same loop in Rails

I have a slight problem, I have managed to iterate 2 objects in the same one, my problem is that it does not work with will_paginate , and to be able to do that iteration I support the Ruby method: sort_by but apparently this doe...
asked by 20.01.2017 / 20:32
1
answer

Migrations in rails

Is there any way that by generating a scaffold per console you can choose the name of the table that generates the migration ?, this in order to work with a mer designed in Spanish. / p>     
asked by 11.10.2016 / 15:36
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

Undefined method 'event_id_select' - Ruby on Rails

I have to create a DropDown depending on the data of a table in my database, I have a line of code that I think I can do it but I have an error Undefined method of event_id_select where I can declare it or how I can resove it , I'm...
asked by 22.07.2018 / 20:59