Hi, I'm using Ruby scripts with RubyMate (r6075). But even the simplest scripts cause many errors. This is showed on top of the content in the output (before <html>):
/Users/simonruderich/Library/Application Support/TextMate/Support/lib/ escape.rb:2: warning: method redefined; discarding old e_sh /Users/simonruderich/Library/Application Support/TextMate/Support/lib/ escape.rb:7: warning: method redefined; discarding old e_sn /Users/simonruderich/Library/Application Support/TextMate/Support/lib/ escape.rb:12: warning: method redefined; discarding old e_as /Users/simonruderich/Library/Application Support/TextMate/Support/lib/ escape.rb:17: warning: method redefined; discarding old e_url /Users/simonruderich/Library/Application Support/TextMate/Support/lib/ escape.rb:24: warning: method redefined; discarding old htmlize /Users/simonruderich/Library/Application Support/TextMate/Bundles/ Ruby.tmbundle/Support/RubyMate/run_script.rb:10: warning: already initialized class variable @@execmatch /Users/simonruderich/Library/Application Support/TextMate/Bundles/ Ruby.tmbundle/Support/RubyMate/run_script.rb:11: warning: already initialized class variable @@execargs /Users/simonruderich/Library/Application Support/TextMate/Bundles/ Ruby.tmbundle/Support/RubyMate/run_script.rb:45: warning: already initialized class variable @@matename /Users/simonruderich/Library/Application Support/TextMate/Bundles/ Ruby.tmbundle/Support/RubyMate/run_script.rb:46: warning: already initialized class variable @@langname
And this error in the "normal" output:
/Users/simonruderich/Library/Application Support/TextMate/Support/lib/ scriptmate.rb:49: warning: instance variable @args not initialized
Even with these errors the script works. I'm using the newest svn checkout of all data.
I also noticed that the Ruby method e_sh is available in a Bundle script even if lib/escape.rp is not loaded. Maybe there could be a relation.
Thanks for all information and ideas,
Simon ----
privacy is necessary using http://gnupg.org public key id: 0x6115F804EFB33229 http://ruderich.com/
simonruderich.asc
Simon,
These aren't really errors, they are just warnings. When ruby is run with the switch '-w' it writes all warnings to stderr. Did you perchance set TM_RUBY? That said, we were including escape.rb twice, and this has been fixed.
Thank you!
- Alex
On Nov 16, 2006, at 10:05 AM, Simon Ruderich wrote:
Hi, I'm using Ruby scripts with RubyMate (r6075). But even the simplest scripts cause many errors. This is showed on top of the content in the output (before <html>):
/Users/simonruderich/Library/Application Support/TextMate/Support/ lib/escape.rb:2: warning: method redefined; discarding old e_sh /Users/simonruderich/Library/Application Support/TextMate/Support/ lib/escape.rb:7: warning: method redefined; discarding old e_sn /Users/simonruderich/Library/Application Support/TextMate/Support/ lib/escape.rb:12: warning: method redefined; discarding old e_as /Users/simonruderich/Library/Application Support/TextMate/Support/ lib/escape.rb:17: warning: method redefined; discarding old e_url /Users/simonruderich/Library/Application Support/TextMate/Support/ lib/escape.rb:24: warning: method redefined; discarding old htmlize /Users/simonruderich/Library/Application Support/TextMate/Bundles/ Ruby.tmbundle/Support/RubyMate/run_script.rb:10: warning: already initialized class variable @@execmatch /Users/simonruderich/Library/Application Support/TextMate/Bundles/ Ruby.tmbundle/Support/RubyMate/run_script.rb:11: warning: already initialized class variable @@execargs /Users/simonruderich/Library/Application Support/TextMate/Bundles/ Ruby.tmbundle/Support/RubyMate/run_script.rb:45: warning: already initialized class variable @@matename /Users/simonruderich/Library/Application Support/TextMate/Bundles/ Ruby.tmbundle/Support/RubyMate/run_script.rb:46: warning: already initialized class variable @@langname
And this error in the "normal" output:
/Users/simonruderich/Library/Application Support/TextMate/Support/ lib/scriptmate.rb:49: warning: instance variable @args not initialized
Even with these errors the script works. I'm using the newest svn checkout of all data.
I also noticed that the Ruby method e_sh is available in a Bundle script even if lib/escape.rp is not loaded. Maybe there could be a relation.
Thanks for all information and ideas, <error.txt> Simon
privacy is necessary using http://gnupg.org public key id: 0x6115F804EFB33229 http://ruderich.com/
simonruderich.asc
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On 17.11.2006, at 05:02, Alexander Ross wrote:
Simon,
These aren't really errors, they are just warnings. When ruby is run with the switch '-w' it writes all warnings to stderr. Did you perchance set TM_RUBY?
I set export RUBYOPT="w" in my .bash_profile file so I get all warnings from my scripts.
That said, we were including escape.rb twice, and this has been fixed.
Thanks, your fix has fixed most of the warnings, but I still get following ones with the newest version:
/Users/simonruderich/Library/Application Support/TextMate/Bundles/ Ruby.tmbundle/Support/RubyMate/run_script.rb:8: warning: already initialized class variable @@args /Users/simonruderich/Library/Application Support/TextMate/Bundles/ Ruby.tmbundle/Support/RubyMate/run_script.rb:39: warning: already initialized class variable @@lang /Users/simonruderich/Library/Application Support/TextMate/Support/lib/ scriptmate.rb:44: warning: instance variable @args not initialized
It would be nice if you could fix these warnings too.
Thank you!
- Alex
Thanks for your response, Simon - ----
privacy is necessary using http://gnupg.org public key id: 0x6115F804EFB33229 http://ruderich.com/
simonruderich.asc