"zsh:1 no matches found" when using gems loaded via Git in Bundler ------------------------------------------------------------------
Key: JRUBY-5858 URL: http://jira.codehaus.org/browse/JRUBY-5858 Project: JRuby Issue Type: Bug Environment: JRuby 1.6.2, Mac OS X 10.6.7, zsh Reporter: Theo Hultberg Assignee: Thomas E Enebo When using gems loaded from Git-repositories with Bundler JRuby prints "zsh:1 no matches found: test/*" (and variants thereof), where MRI does not. The message stems from some .gemspec files having lines like the following: {noformat} s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") {noformat} (this is generated by {{bundle gem}} so it's quite common) If the gem does not contain the "test" directory JRuby will print a warning, but MRI does not. When a gem is loaded from a Git-repo Bundler will run its .gemspec file every time you run {{Bundler.setup}}. To replicate the problem do the following: * Use ZSH (I can replicate in Bash too, but since it still prints "zsh:1 ..." I assume JRuby somehow looks at my default shell) * Create a new directory and move into it * Create a {{Gemfile}} with the following line: {noformat} gem 'toadhopper', :git => 'git://github.com/iconara/toadhopper.git' {noformat} * Run {{bundle install}} * Run {{jruby -e 'require "bundler/setup"'}} (I run with --1.9, but it seems to affect --1.8 too) * Observe the errors * Run {{ruby -e 'require "bundler/setup"'}} (I used Ruby 1.9.2) * Observe that no errors were printed It seems like MRI and JRuby have different behaviours when it comes to how errors caused by commands run in backticks are handled. There is a workaround that consists of changing all .gemspec files in all gems that you use and load from Git-repositories, but that's very inconvenient -- and since Bundler's template contains code that will cause the problem you will run into it again and again. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email