Dynamically load a JavaScript file

How can you reliably and dynamically load a JavaScript file? This will can be used to implement a module or component that when ‘initialized’ the component will dynamically load all needed JavaScript library scripts on demand. The client that uses the component isn’t required to load all the library script files (and manually insert <script> … Read more

How to create a file in Ruby

I’m trying to create a new file and things don’t seem to be working as I expect them too. Here’s what I’ve tried: File.new “out.txt” File.open “out.txt” File.new “out.txt”,”w” File.open “out.txt”,”w” According to everything I’ve read online all of those should work but every single one of them gives me this: ERRNO::ENOENT: No such file … Read more