# Rails and Dojo

**URL:** <https://www.ruby-forum.com/t/rails-and-dojo/99635>\
**Category:** Rails\
**Created:** [July 24, 2006, 4:42pm UTC](https://www.ruby-forum.com/t/rails-and-dojo/99635 "2006-07-24T16:42:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bradley\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7ba0ec/32.png) [@Bradley\_M](https://www.ruby-forum.com/u/Bradley_M)\
**Post date:** [July 24, 2006, 4:42pm UTC](https://www.ruby-forum.com/t/rails-and-dojo/99635/1 "2006-07-24T16:42:38Z")

</div>

Anyone have any positive or negative experiences trying to get Dojo to  
play nicely with Rails / Prototype / Scriptaculous?

Would people recommend it? Recommend against it? Why?

Thanks,  
Brad

---

<div class="post-metadata">

**Author:** ![Bradley\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7ba0ec/32.png) [@Bradley\_M](https://www.ruby-forum.com/u/Bradley_M)\
**Post date:** [July 24, 2006, 4:55pm UTC](https://www.ruby-forum.com/t/rails-and-dojo/99635/2 "2006-07-24T16:55:11Z")

</div>

> Anyone have any positive or negative experiences trying to get Dojo to  
> play nicely with Rails / Prototype / Scriptaculous?

You could get it to work with Rails no problem but you’ll basically  
just not be able to use any of the JavaScript helpers. Just drop Dojo  
into your javascripts directory and use:

\<%= javascript\_include\_tag :dojo %\>

And you should be away.

I don’t reccomend trying to use Dojo alongside Prototype and  
Scriptaculous though. For a start theres lots of crossover  
functionality that is implemented very differently and is likely to  
clash (the event handling stuff for a start). Also, to load Dojo,  
Prototype and Scriptaculous you’d be looking at upwards of 400K of  
JavaScript. I’ve not tried using them together for the above reasons  
so I’m not sure if there are any code related problems but I’d expect  
that they’d clash in untold ways.

Dojo on its own has more than enough functionality for most of your  
needs.

> Would people recommend it? Recommend against it? Why?

I don’t see a problem with it as long as you don’t expect to be able  
to use the JavaScript helpers or RJS. Personally, I’d love to see RJS  
and the javascript helpers removed from the rails core to allow more  
freedom for developers to work with other JS libs.

Cheers,

---

<div class="post-metadata">

**Author:** ![Bradley\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7ba0ec/32.png) [@Bradley\_M](https://www.ruby-forum.com/u/Bradley_M)\
**Post date:** [July 24, 2006, 5:24pm UTC](https://www.ruby-forum.com/t/rails-and-dojo/99635/3 "2006-07-24T17:24:57Z")

</div>

On Jul 24, 2006, at 16:53, Dan W. wrote:

> And you should be away.
> 
> I don’t reccomend trying to use Dojo alongside Prototype and  
> Scriptaculous though.

But some helpers generate code that depends on those, you don’t use  
them?

– fxn

---

<div class="post-metadata">

**Author:** ![Bradley\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7ba0ec/32.png) [@Bradley\_M](https://www.ruby-forum.com/u/Bradley_M)\
**Post date:** [July 24, 2006, 5:56pm UTC](https://www.ruby-forum.com/t/rails-and-dojo/99635/4 "2006-07-24T17:56:22Z")

</div>

> But some helpers generate code that depends on those, you don’t use  
> them?

Like I said, if you are using another JS lib such as Dojo you are best  
of learning to live without the helpers.
