These are chat archives for opal/opal

13th
Mar 2015
Can Edremitoglu
@cantonic
Mar 13 2015 22:22
guys, when renaming application.js to application.js.rb, the require statements should be changed to ruby's require as well, right? (in Rails)
Elia Schito
@elia
Mar 13 2015 22:24
@cantonic to some extent it should work as it reaches the sprockets directive processor anyway, but "Sprockets requires" won't be known by the opal builder and thus you can end up adding something twice
Can Edremitoglu
@cantonic
Mar 13 2015 22:26
@elia so changing them to “ruby requires” is recommended then? I will update the README in opal-rails accordingly in that case
Elia Schito
@elia
Mar 13 2015 22:26
yes please : )
Can Edremitoglu
@cantonic
Mar 13 2015 22:27
@elia I just changed my application.js to js.rb and also changed the requires, but some required libraries throw errors now. I am getting An error occurred while compiling: s3_direct_upload negative argument. Do you have an idea what the reason might be?
Elia Schito
@elia
Mar 13 2015 22:28
I saw the negative arg error once, but right now don't remember what it was
anyway you can try keep sprockets requires as long as you don't require them in ruby land too
Can Edremitoglu
@cantonic
Mar 13 2015 22:32
gotcha. I will tell in the readme that both ways are possible. Thank you a lot
Can Edremitoglu
@cantonic
Mar 13 2015 23:11
@elia is it possible that the negative argument error happens when opal has to deal with js.coffee files? I took the error causing file s3_direct_upload.js.coffee, changes it to plain JS using js2coffee and renamed it accordingly: error gone
Can Edremitoglu
@cantonic
Mar 13 2015 23:28
oh no. ignore my message. now another error is there :)