meh` changed the topic of #opal to: http://opalrb.org - Ruby runtime and library on top of Javascript | 1.0.0 is near | This channel is logged at https://botbot.me/freenode/opal/
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
dimaursu16 has quit [Ping timeout: 265 seconds]
DrShoggoth has joined #opal
DrShoggoth has quit [Client Quit]
dimaursu16 has joined #opal
DrShoggoth has joined #opal
e_dub has joined #opal
meh` has quit [Remote host closed the connection]
meh`_ has joined #opal
meh`_ has quit [Quit: I don't want to live on this planet anymore.]
ryanstout has quit [Quit: ryanstout]
adambeynon has quit [Ping timeout: 265 seconds]
antonishen has quit [Ping timeout: 240 seconds]
dimaursu16 has quit [Ping timeout: 264 seconds]
DouweM has quit [Ping timeout: 240 seconds]
antonishen has joined #opal
kludge` has quit [Ping timeout: 252 seconds]
kludge` has joined #opal
adambeynon has joined #opal
DouweM has joined #opal
dimaursu16 has joined #opal
meh` has joined #opal
elia has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
meh` has quit [Ping timeout: 240 seconds]
Kilo`byte has quit [Ping timeout: 240 seconds]
Kilo`byte has joined #opal
DrShoggoth has quit [Ping timeout: 265 seconds]
DrShoggoth has joined #opal
Anand_ has joined #opal
<Anand_> Hi
<Anand_> This is the first time here.
<Anand_> I was wondering if some one can help me with a problem I have
<Anand_> I have opal jquery installed in my rails
<Anand_> for some reason does not seem to be loading jquery
Anand__ has joined #opal
Anand_ has quit [Quit: Page closed]
Anand__ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
<adambeynon> hi Anand_ : you have to require jquery explicitly
<adambeynon> if you are using rails, it already has it registered as a gem
<adambeynon> so just add a "require 'jquery'" to your opal source
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
tils has joined #opal
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
<Anand_> HI Adambeynom, I already have require 'opal'
<Anand_> require 'opal_ujs'
<Anand_> require 'opal-jquery'
<Anand_> in my firebug when I do $, it does show query is loaded
<Anand_> it comes back with "jQuery 1.11.0(selector, context)"
<adambeynon> Anand_: so what is the actual error that shows up?
<Anand_> Hi Adam, There is no error. I am not able to get a simple jq method say element.css 'color','white' to work
<adambeynon> Anand_: does the selector definately find the element? try inspecting the instance which should list each dom element it finds
<Anand_> require 'opal'
<Anand_> require 'opal_ujs'
<Anand_> require 'opal-jquery'
<Anand_> elements = Element['.art']
<Anand_> puts 'just elements =' + elements
<Anand_> puts 'just elements.class =' + elements.class
<Anand_> elements.css 'color','white'
<Anand_> Document.ready? do
<Anand_> elements.css 'color','white'
<Anand_> end
<adambeynon> Anand_: you probably need to put the selector inside the ready block
<Anand_> no luck after I did that
<Anand_> I downloaded vienna and modified an opal file to see if a simi=lair method worked
<Anand_> It did.
<Anand_> My index.html seems to some how get <script data-turbolinks-track="true" src="/assets/greeter.js?body=1"></script>
<Anand_> <script data-turbolinks-track="true" src="/assets/application.js?body=1"></script>
<Anand_> not sure if having the greeter.js be loaded after application.js
<adambeynon> Anand_: thats just turolinks kicking in (a default rails gem)
<adambeynon> Im not sure why its not applying the class
<adambeynon> that method is working ok for me locally
<Anand_> OK Adam.
<Anand_> Thank I will dig around
<Anand_> Thank you rod retaking time to help me out
<Anand_> Have a great day.
<Anand_> later.
natahost has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
natahost has quit [Remote host closed the connection]
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
<tils> Hello everyone! I'm new to opal and already love it - ruby for everything!
<tils> I have a question - how can I set the property of an object that was created natively, like this:
<tils> audio = %x{ new Audio() }
<tils> I would like to set the src property, and got it to work like this so far:
<tils> %x{ #{audio}.src = "/assets/sounds/bicycle.mp3" }
<tils> but how can I replace the string dynamically with a ruby value?
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
<tils> ok, I think I found it, this works: sound = "foo.mp3"; %x{ #{audio}.src = #{sound} }
<tils> I was previously trying to use an interpolated string inside the %x{ } block, which didn't work
elia has joined #opal
Anand_ has joined #opal
<tils> like this: %x{ #{audio}.src = "/assets/sounds/#{mode}.mp3" }
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
<adambeynon> hi tils: is that working ok for you now? Native makes a nice wrapper around native objects so you can use "real" ruby code
<adambeynon> audio = Native(`new Audio`)
<adambeynon> audio.src = "..."
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
<tils> adambeynon: cool thanks, didn't know about Native
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
DrShoggoth has quit [Quit: Leaving]
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
ryanstout has joined #opal
ryanstout has quit [Client Quit]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
DouweM has quit [Ping timeout: 240 seconds]
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
meh` has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
DouweM has joined #opal
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
ryanstout has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]
Anand_ has joined #opal
Anand_ has quit [Read error: Connection reset by peer]