These are chat archives for opal/opal

9th
Nov 2017
Philippe Nénert
@papilip
Nov 09 2017 13:39
Hello all, opal is very very good but i cant use Date :
Why Date.parse '2012-10-12' not work ?
Thank in advance
Mitch VanDuyn
@catmando
Nov 09 2017 14:45
@papilip to reduce payload size the date and time STD library are not by default included. You do a require 'time'
Ilya Bylich
@iliabylich
Nov 09 2017 14:46
Which version of opal are you using?
$ opal -v -rdate -e "p Date.parse('2012-10-12')"
Opal v0.11.0.rc1
2012-10-12
Mitch VanDuyn
@catmando
Nov 09 2017 14:46
FYI I'm on my phone. And can't verify the above. May have file name wrong
Philippe Nénert
@papilip
Nov 09 2017 14:47
@ @iliabylich thanks, i’m trying with http://opalrb.com/try/
opal -v => Opal v0.10.5
require 'date'
Date.parse '2012-10-12'
parse: undefined method `parse' for Date
Philippe Nénert
@papilip
Nov 09 2017 14:53
@catmando sory i have not read your response
require 'date' in my rails app, it’s OK !
Mitch VanDuyn
@catmando
Nov 09 2017 17:02
@papilip if you are enjoying opal and you might checkout http://ruby-hyperloop.org chat is here: https://gitter.im/ruby-hyperloop/chat