That would be the vendor folder. Or in a gem:
https://github.com/spohlenz/tinymce-rails

Vendorizing an external Javascript library is pretty easy in 3.1.

On Mon, Oct 3, 2011 at 11:57, Alexei Vakhov <[email protected]> wrote:

> Hello!
>
> Santiago Pastorino, Wael Nasreddine thanks for answers. Excuse me I want to
> disturb you once more.
>
> Problem Description:
> ===============
> I migrate one project which uses mapstraction javascript library from
> 3.0.10 to 3.1.1.
> I install sprockets 2.0.1 version instead 2.0.0.
> I put full mapstraction source to public/3rd_party/mxn-2.0.17 folder. And
> include it in view (haml):
>
> - content_for :head do
>   = javascript_include_tag('
> http://maps.googleapis.com/maps/api/js?sensor=false')
>   =
> javascript_include_tag('/public/3rd_party/mxn-2.0.17/mxn.js?(googlev3)')
>
> It worked well for sprockets 2.0.0, but in 2.0.1 I get error
> "/3rd_party/mxn-2.0.17-patch1/mxn.js?(googlev3) isn't in paths:  ..."
> (I think after the commit
> https://github.com/sstephenson/sprockets/commit/fa0ca6d1f279ec43c80b5f3870fed9d54460c95e
> )
>
>
> Possible Solutions:
> =============
>
> 1.
> On Sun, Oct 2, 2011 at 2:12 AM, Santiago Pastorino <[email protected]>
> wrote:
> > You can still put assets in public/assets/ ...
>
> It works but I don't like to mix autogenerated files and custom. I wanted
> even to send request
> https://github.com/avakhov/rails/commit/c21ea000a7ffbb4366130e30d7fd60cd4bbecf96-
>  ignore public/assets folder in git, but waiting answer now.
>
> 2.
>
> On Sat, Oct 1, 2011 at 7:49 PM, Wael Nasreddine <[email protected]
> > wrote:
> > Why don't you put you them in the vendor/assets folder? Makes more sence
> there than the public folder anyway
>
> It works in development but rake assets:precompile is broken. Mapstraction
> library has files with sophisticated names and it brokes preprocessing.
>
> ~/m/ideas/proj[rails31-2]$ rake assets:precompile --trace
> ** Invoke assets:precompile (first_time)
> ** Execute assets:precompile
> rake aborted!
> Unexpected token: operator (<)
>   (in
> /home/alex/m/ideas/proj/vendor/assets/3rd_party/mxn-2.0.17-patch1/docs/symbols/src/H__Projects_mapstraction-2.0_git_mapstraction_mxn_build_2.0.17_mxn.core.js.html)
>
>
> 3.
> I can manual remove files with such extentions from solution 2, but I like
> to put library as a whole to simplify upgrade.
>
>
> Question
> =======
>
> What is right Rails-way to store big external javascript libraries (mash of
> styles, javascripts, images, documentation etc.) like mapstration, tinymce
> and other?
>
> Thanks!
>
> Alexey Vakhov
>
>
>
>
> On Sun, Oct 2, 2011 at 2:12 AM, Santiago Pastorino <[email protected]>
> wrote:
> >
> > You can still put assets in public/assets/ the thing is asset helper
> > methods included from sprockets are not documented. This is confusing
> > and we should fix it.
> >
> > On Sat, Oct 1, 2011 at 10:45 AM, Alexei Vakhov <[email protected]> wrote:
> > > Hello!
> > >
> > > I installed sprockets 2.0.1 and found that javascript_include_tag and
> > > stylesheet_link_tag dont' support script and style files from public
> > > folder anymore. If I use javascript_include_tag
> '/some-file-from-public.js'
> > > I get error that file not found in assets paths.
> > >
> > > Is it right behaviour? I prefer to use big 3rd party libraries like
> tinymce
> > > from public folder.
> > >
> > > In any case with new 2.0.1 version documentation pages
> > >
> http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper/JavascriptTagHelpers.html#method-i-javascript_include_tag
> > > and
> > >
> http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper/StylesheetTagHelpers.html#method-i-stylesheet_link_tag
> > > are obsoleted.
> > >
> > > Unfortunately I don't have time to investigate changes deep now :(
> > >
> > > --
> > > Alexey Vakhov
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-core?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to