Questions tagged as 'irb'

4
answers

Upload file to the current directory when running irb

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...
asked by 11.12.2013 / 18:20
0
answers

Create new user in the database via Rails C

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...
asked by 06.09.2016 / 21:01
1
answer

How to subtract two dates using Ruby and the Time library?

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...
asked by 19.04.2016 / 16:08