It is possible to call the irb by passing as a parameter a library to be loaded (required):
irb -r date
But this does not work if I want to load a file into the directory where the command is executed:
irb -r meuscript
(assuming the...
Help me where the error is occurring, because I am not able to identify because the field is not being recognized.
rails c
u = User.new(email:'[email protected]', registration:192536, password:'changeme', password_confirmation:'changeme')
Look...
This is the code:
require 'time'
t = Time.parse('2016-04-18') #data de ontém
t2 = Time.now #data atual
t3 = t2 - t # subtração das duas variáveis(datas) acima
puts Time.at(t3) #resultado da subtração
In this case the result should be a day...