Questions tagged as 'ruby-on-rails'

2
answers

How do I prevent the Heroku server / Dyno from hibernating or sleeping?

I would like to know how to prevent Heroku's server (also called Dyno ) from going into hibernation or sleeping after a certain period without visits in your free plan. Is it possible to prevent a site from entering this hibernation state eve...
asked by 28.01.2015 / 23:41
2
answers

How to run unit tests on rspec?

When I run rake spec it runs all tests. How do I run only the unit tests.     
asked by 21.11.2014 / 13:21
1
answer

can not load such file - config / boot (LoadError) - redmine ruby

I had redmine installed on a ubuntu server 12.04 I decided to upgrade from redmine to the new version. After following all the steps in this tutorial: link I'm getting the error message below. How to proceed? /usr/lib/ruby/1.9.1/rubygems/c...
asked by 14.08.2014 / 20:52
1
answer

belongs_to has_many search information in the table

I have 2 tables: user and contact , and I created a third one for linking the two: user_contact : class User < ActiveRecord::Base has_many:user_contacts end class Contact < ActiveRecord::Base has_many:user_...
asked by 09.08.2014 / 20:08
1
answer

Problem with "confirmable" gem module "devise" in RubyOnRails

I was implementing the gem Devise in RubyOnRails and everything was working perfectly. Then I went to add the "confirmable" module. I took the following steps: I added :confirmable to Usuarios.rb : class Usuario < Activ...
asked by 28.04.2014 / 14:34
3
answers

Managing Ruby / Rails Versions in Windows

I use Windows and I have Ruby / Rails installed on my machines using Rails Installer . Currently I have installed Ruby 1.9.3 and Rails 4.0.2. Today I read about the new Rails 4.1 and thought: If I installed Rails 4.1 on my machine,...
asked by 30.04.2014 / 14:46
2
answers

How to initialize has_many attributes in Rails automatically

Currently I have 3 models class Regiao < ActiveRecord::Base has_many :tipofretes has_many :valorfretes, through: :tipofretes end class Tipofrete < ActiveRecord::Base has_many :regiao has_many :valorfretes, through: :regiaofretes...
asked by 18.06.2014 / 16:35
1
answer

Save only the year in a date field in Postgres! RAILS

I have two fields called start_anno and termino_an, where I want to save only the year that the user will select and save to the database. But when you save the form that is processed by RAILS, it saves year, month, and day. IwouldliketoknowifI...
asked by 20.11.2018 / 03:21
1
answer

Sending Records for a New View

I created a new action knowledges in my controller responsabilities and created a view called nested_knowledges . I made the action render this view. I put the following code in this view: <%= form_tag edit_responsab...
asked by 03.06.2014 / 17:02
1
answer

Rails and Iugu: Iugu :: Subscription.create

I'm trying to sign up for a user with my credit card details so I can bill my customers for later. Registration is done in Iugu, but the credit card details are not registered in Iugu. I'm using the calls below. Has anyone done this kind of i...
asked by 12.11.2018 / 15:47