prototypejs / prototype

Prototype JavaScript framework
http://prototypejs.org/
Other
3.54k stars 639 forks source link

Rake dist fails with latest Sprockets #279

Closed rye closed 9 years ago

rye commented 9 years ago

When I run rake dist, I get this output:

kristofer@palochka:~/Software/prototype-git (master)$ rake dist

You seem to be missing the required selector engine. Obtaining it via git...

Submodule 'vendor/caja_builder' (git://github.com/tobie/unittest_js_caja_builder.git) registered for path 'vendor/caja_builder'
Submodule 'vendor/nwmatcher/repository' (git://github.com/dperini/nwmatcher.git) registered for path 'vendor/nwmatcher/repository'
Submodule 'vendor/pdoc' (git://github.com/tobie/pdoc.git) registered for path 'vendor/pdoc'
Submodule 'vendor/sizzle/repository' (git://github.com/jquery/sizzle.git) registered for path 'vendor/sizzle/repository'
Submodule 'vendor/slick/repository' (git://github.com/mootools/slick.git) registered for path 'vendor/slick/repository'
Submodule 'vendor/sprockets' (git://github.com/sstephenson/sprockets.git) registered for path 'vendor/sprockets'
Submodule 'vendor/unittest_js' (git://github.com/tobie/unittest_js.git) registered for path 'vendor/unittest_js'
Cloning into 'vendor/sizzle/repository'...
remote: Counting objects: 4490, done.
remote: Compressing objects: 100% (1758/1758), done.
remote: Total 4490 (delta 2666), reused 4403 (delta 2601)
Receiving objects: 100% (4490/4490), 2.72 MiB | 2.28 MiB/s, done.
Resolving deltas: 100% (2666/2666), done.
Checking connectivity... done.
Submodule path 'vendor/sizzle/repository': checked out 'a9eb3ca3c5e1b568057390f73da385809ac69340'
rake aborted!
uninitialized constant Sprockets::Secretary
/home/kristofer/Software/prototype-git/Rakefile:59:in `sprocketize'
/home/kristofer/Software/prototype-git/Rakefile:219:in `block in <top (required)>'
Tasks: TOP => dist
(See full trace by running task with --trace)
kristofer@palochka:~/Software/prototype-git (master)$ rake dist

Doing a bit of poking around, this appears to be because I have the latest version of Sprockets installed (2.12.3), and Sprockets::Secretary was retired entering the 2.x.x range. Should I install an outdated version of Sprockets, or could someone fix (or tell me what needs to be done to) the Rakefile?

jwestbrook commented 9 years ago

Can you try running git submodule init in the directory and then running rake dist again?

savetheclocktower commented 9 years ago

Submodule init happened automatically when he did rake dist.

I can reproduce this in the case where Sprockets is installed as a gem. Trying to figure out why the gem version trumps the submodule that we explicitly put in the load path.

rye commented 9 years ago

@savetheclocktower is correct; running git submodule init in the Git root yields no output and no change in behavior.

savetheclocktower commented 9 years ago

Ah, it's because we're too clever; we don't try to install the submodule via git until after we require Sprockets. So if you've already got it installed, submodule init happens, but we see that require 'sprockets' works, and we assume you don't need the submodule. This is dumb of us.

git submodule update should fix it for now.

rye commented 9 years ago

Indeed it does. Thanks for the help, closing this issue.

savetheclocktower commented 9 years ago

Reopening; working on a Rakefile change that should handle this better. Thanks!