# Question about load(). WasRe: envjs rubygem 0.1.1

**URL:** <https://www.ruby-forum.com/t/question-about-load-wasre-envjs-rubygem-0-1-1/183429>\
**Category:** Ruby\
**Created:** [February 13, 2010, 8:23pm UTC](https://www.ruby-forum.com/t/question-about-load-wasre-envjs-rubygem-0-1-1/183429 "2010-02-13T20:23:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ed\_Howland](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7993a0/32.png) [@Ed\_Howland](https://www.ruby-forum.com/u/Ed_Howland)\
**Post date:** [February 13, 2010, 8:23pm UTC](https://www.ruby-forum.com/t/question-about-load-wasre-envjs-rubygem-0-1-1/183429/1 "2010-02-13T20:23:58Z")

</div>

Steven,

How closely does the env-js gem follow the docs for the Rhino based  
project? For instance: window.location=“some.html” that has a script  
tag that loads jquery.js, seems to be loading that external file. The  
server logs a GET for it anyhow, and it seems to be live within  
evaluates.

But the docs say you must explicity load them.

Cheers,  
Ed

Ed Howland

> **[Green Programming - Blogging about Ruby, jQuery and Beyond!](https://greenprogrammer.wordpress.com)**
>
> Just another WordPress.com weblog

[http://twitter.com/ed\_howland](http://twitter.com/ed_howland)

---

<div class="post-metadata">

**Author:** ![Ed\_Howland](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7993a0/32.png) [@Ed\_Howland](https://www.ruby-forum.com/u/Ed_Howland)\
**Post date:** [February 13, 2010, 8:46pm UTC](https://www.ruby-forum.com/t/question-about-load-wasre-envjs-rubygem-0-1-1/183429/2 "2010-02-13T20:46:13Z")

</div>

On Feb 13, 2010, at Feb 13,11:23 AM , Ed Howland wrote:

> How closely does the env-js gem follow the docs for the Rhino based  
> project?

Uh … moderately? I didn’t purposefully break anything and I run all  
the (old) tests. But our old test coverage wasn’t so hot (a big focus  
area right now), so things may have gotten broken inadvertently.

> For instance: window.location=“some.html” that has a script  
> tag that loads jquery.js, seems to be loading that external file. The  
> server logs a GET for it anyhow, and it seems to be live within  
> evaluates.
> 
> But the docs say you must explicity load them.

Ah, right. I’ve been a bit fast and loose about that. The default in the  
gem is to allow javascript to be loaded, which is not the default on the  
main branch. This needs to be reconciled. I’ll probably switch back to  
making it not be a default, but I imagine adding support for an .envjsrc  
file so that I can set default options on a per-project basis rather  
than in every file loaded.

There may be other differences in this area, too. I need env.js to  
function pretty much as a browser and if I recall, there are cases where  
the master fork didn’t allow certain combinations of local/remote/etc.  
Again, all planned to be reconciled, but currently the master fork is  
undergoing a lot of rework, so that’s on hold.

Follow-ups might be better to [http://groups.google.com/group/envjs](http://groups.google.com/group/envjs)?
