xorcery / coyote

A speedy tool for combining and compressing your JavaScript and CoffeeScript source files.
http://imulus.github.com/coyote
20 stars 2 forks source link

--watch leads to "can't convert nil into String (TypeError)" #10

Open srid opened 12 years ago

srid commented 12 years ago

on mac lion with default ruby,

→ coyote --watch less/main.less:static/main.css 
/Library/Ruby/Gems/1.8/gems/coyote-1.2.1/lib/coyote/bundles.rb:15:in `extname': can't convert nil into String (TypeError)
    from /Library/Ruby/Gems/1.8/gems/coyote-1.2.1/lib/coyote/bundles.rb:15:in `choose'
    from /Library/Ruby/Gems/1.8/gems/coyote-1.2.1/lib/coyote/bundles.rb:9:in `new'
    from /Library/Ruby/Gems/1.8/gems/coyote-1.2.1/lib/coyote/compiler.rb:13:in `initialize'
    from /Library/Ruby/Gems/1.8/gems/coyote-1.2.1/lib/coyote.rb:9:in `new'
    from /Library/Ruby/Gems/1.8/gems/coyote-1.2.1/lib/coyote.rb:9:in `compile'
    from /Library/Ruby/Gems/1.8/gems/coyote-1.2.1/lib/coyote/cli.rb:17
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:55:in `gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:55:in `require'
    from /Library/Ruby/Gems/1.8/gems/coyote-1.2.1/bin/coyote:6
    from /usr/bin/coyote:19:in `load'
    from /usr/bin/coyote:19
srid commented 12 years ago

i tried coyote --watch 1 less/main.less:static/main.css which works, but then nothing happens when the file is changed.

caseyohara commented 12 years ago

@srid Try this: coyote less/main.less:static/main.css --watch

srid commented 12 years ago

hmm, doesn't work:

→ coyote less/main.less:static/main.css --watch
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:451:in
`parse': missing argument: --watch (OptionParser::MissingArgument)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1266:in
`parse_in_order'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1254:in
`catch'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1254:in
`parse_in_order'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1248:in
`order!'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1339:in
`permute!'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1360:in
`parse!'
    from /Library/Ruby/Gems/1.8/gems/coyote-1.2.1/lib/coyote/cli.rb:4
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:55:in
`gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:55:in `require'
    from /Library/Ruby/Gems/1.8/gems/coyote-1.2.1/bin/coyote:6
    from /usr/bin/coyote:19:in `load'
    from /usr/bin/coyote:19
caseyohara commented 12 years ago

@srid what do you get when you run which lessc?

srid commented 12 years ago
→ which lessc
/usr/local/bin/lessc
→ head -n 3 /usr/local/bin/lessc
#!/usr/bin/env node

var path = require('path'),
→ which node
/usr/local/bin/node
benlumley commented 11 years ago

I get the same error - but it works if i give --watch and -w ?! Odd!

caseyohara commented 11 years ago

@benlumley What is the full command you are using?

benlumley commented 11 years ago

Works:

coyote myfile.less:output.css --watch -w

Both break:

coyote myfile.less:output.css --watch

coyote myfile.less:output.css -w

Hope that's helpful - makes no difference where the -w and --watch are btw.

Ben

On Wednesday, 10 October 2012 at 05:55, Casey O'Hara wrote:

@benlumley (https://github.com/benlumley) What is the full command you are using?

— Reply to this email directly or view it on GitHub (https://github.com/imulus/coyote/issues/10#issuecomment-9290067).

caseyohara commented 11 years ago

Interesting. Let me see if I can reproduce it.

darky commented 11 years ago

+1 it's work only with both flags: -w and --watch for less lol

caseyohara commented 11 years ago

@darrrk Try using http://github.com/imulus/banshee. It is a Node version of Coyote (same command line interface) with some new features and it's about 5x faster.

darky commented 11 years ago

Thanks, ok =)

chrisjlee commented 11 years ago

Any chance that you'll get this problem fixed? I really like this project over some others.

BruceClark commented 11 years ago

Hey Chris,

We recommend checking out banshee, per Casey's recommendation on the post above. https://github.com/imulus/banshee