I keep having intermittent problems with bundles that use ruby scripts. I get errors along the lines of:
/tmp/temp_textmate.gD8qB9:11:in `require': No such file to load -- erb (LoadError) from /tmp/temp_textmate.gD8qB9:11
Any clue on the cause?
-ryan
On Jun 9, 2006, at 6:21 PM, Ryan King wrote:
I keep having intermittent problems with bundles that use ruby scripts. I get errors along the lines of:
/tmp/temp_textmate.gD8qB9:11:in `require': No such file to load -- erb (LoadError) from /tmp/temp_textmate.gD8qB9:11
Any clue on the cause?
It would help if you tell us what script this is, what version of Ruby you have, and whether erb is located in your computer somewhere. The above message seems to indicate that the script tries to load the erb library but can't find it. When I run "locate erb.rb" from the command line, I get "/usr/lib/ ruby/1.8/erb.rb".. What do you get?
-ryan
Haris
On Jun 9, 2006, at 8:06 PM, Charilaos Skiadas wrote:
On Jun 9, 2006, at 6:21 PM, Ryan King wrote:
I keep having intermittent problems with bundles that use ruby scripts. I get errors along the lines of:
/tmp/temp_textmate.gD8qB9:11:in `require': No such file to load -- erb (LoadError) from /tmp/temp_textmate.gD8qB9:11
Any clue on the cause?
It would help if you tell us what script this is, what version of Ruby you have, and whether erb is located in your computer somewhere.
It's the TODO package.
~ ryan$ ruby -v ruby 1.8.4 (2005-12-24) [powerpc-darwin8.6.0]
And this:
~ ryan$ ruby -we 'require "erb"'
gives no errors.
The above message seems to indicate that the script tries to load the erb library but can't find it. When I run "locate erb.rb" from the command line, I get "/usr/lib/ ruby/1.8/erb.rb".. What do you get?
I get /usr/local/lib/ruby/1.8/erb.rb.
My ruby is in /usr/local, not /usr, but that shouldn't cause any problems.
-ryan
On Jun 11, 2006, at 7:28 PM, Ryan King wrote:
It's the TODO package.
~ ryan$ ruby -v ruby 1.8.4 (2005-12-24) [powerpc-darwin8.6.0]
And this:
~ ryan$ ruby -we 'require "erb"'
gives no errors.
The above message seems to indicate that the script tries to load the erb library but can't find it. When I run "locate erb.rb" from the command line, I get "/usr/lib/ ruby/1.8/erb.rb".. What do you get?
I get /usr/local/lib/ruby/1.8/erb.rb.
My ruby is in /usr/local, not /usr, but that shouldn't cause any problems.
The only thing I can think of is to try to change the first line of the TODO script from:
#!/usr/bin/env ruby
to
#!/usr/local/bin/ruby
It should not make a difference, but you never know. I guess the question would be where does /usr/bin/env look for your ruby. Do you have more than one ruby installed? How did you install ruby? Does running this command give any errors: /usr/bin/env ruby -we 'require "erb"'
-ryan
Haris
On 12/6/2006, at 2:28, Ryan King wrote:
Any clue on the cause?
It would help if you tell us what script this is, what version of Ruby you have, and whether erb is located in your computer somewhere.
It's the TODO package. [...] I get /usr/local/lib/ruby/1.8/erb.rb.
My ruby is in /usr/local, not /usr, but that shouldn't cause any problems.
That probably is the problem, as the TODO will find your Ruby 1.6 which lacks ERb.
See the paragraph starting with ‘Important’ here [1] and follow instructions, or alternatively create a symlink or similar from /usr/ bin/ruby to Ruby 1.8 (and remove 1.6.)
[1] http://macromates.com/textmate/manual/shell_commands#search_path
On Jun 12, 2006, at 10:04 AM, Allan Odgaard wrote:
On 12/6/2006, at 2:28, Ryan King wrote:
Any clue on the cause?
It would help if you tell us what script this is, what version of Ruby you have, and whether erb is located in your computer somewhere.
It's the TODO package. [...] I get /usr/local/lib/ruby/1.8/erb.rb.
My ruby is in /usr/local, not /usr, but that shouldn't cause any problems.
That probably is the problem, as the TODO will find your Ruby 1.6 which lacks ERb.
See the paragraph starting with ‘Important’ here [1] and follow instructions, or alternatively create a symlink or similar from / usr/bin/ruby to Ruby 1.8 (and remove 1.6.)
Alright, I've removed my old copy of ruby in /usr/bin and did the environment changes, and only then would things work.
This bring up a question, though. In Textmate, I'd set PATH = "/usr/ local/bin:/usr/bin" (via Preferences -> advanced -> shell variables).
Shouldn't this take precedence?
-ryan
On 12/6/2006, at 22:50, Ryan King wrote:
This bring up a question, though. In Textmate, I'd set PATH = "/ usr/local/bin:/usr/bin" (via Preferences -> advanced -> shell variables).
Shouldn't this take precedence?
For shebang scripts, yes.
I tried setting PATH myself in advanced preferences and then did ^R with these two lines selected:
#!/bin/sh echo "$PATH"
This did show the changed path. So not sure why it would fail to work for you.
On Jun 12, 2006, at 2:03 PM, Allan Odgaard wrote:
On 12/6/2006, at 22:50, Ryan King wrote:
This bring up a question, though. In Textmate, I'd set PATH = "/ usr/local/bin:/usr/bin" (via Preferences -> advanced -> shell variables).
Shouldn't this take precedence?
For shebang scripts, yes.
I tried setting PATH myself in advanced preferences and then did ^R with these two lines selected:
#!/bin/sh echo "$PATH"
This did show the changed path. So not sure why it would fail to work for you.
Yeah, I'm not sure either, but here's the result of running some scripts with ^r
#!/bin/sh
echo $PATH
result: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
#!/usr/bin/env ruby
puts 'foo'
result: env: ruby: No such file or directory
#!/bin/sh
which ruby
result: /usr/local/bin/ruby
As you can see, which can find ruby, but env can't. I have no idea why.
-ryan
If you run the following, what's the output?
#!/usr/bin/env env
-- G.
On 6/13/06, Ryan King ryan@theryanking.com wrote:
On Jun 12, 2006, at 2:03 PM, Allan Odgaard wrote:
On 12/6/2006, at 22:50, Ryan King wrote:
This bring up a question, though. In Textmate, I'd set PATH = "/ usr/local/bin:/usr/bin" (via Preferences -> advanced -> shell variables).
Shouldn't this take precedence?
For shebang scripts, yes.
I tried setting PATH myself in advanced preferences and then did ^R with these two lines selected:
#!/bin/sh echo "$PATH"
This did show the changed path. So not sure why it would fail to work for you.
Yeah, I'm not sure either, but here's the result of running some scripts with ^r
#!/bin/sh
echo $PATH
result: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
#!/usr/bin/env ruby
puts 'foo'
result: env: ruby: No such file or directory
#!/bin/sh
which ruby
result: /usr/local/bin/ruby
As you can see, which can find ruby, but env can't. I have no idea why.
-ryan
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
On Jun 18, 2006, at 8:01 PM, Guido Sohne wrote:
If you run the following, what's the output?
#!/usr/bin/env env
Hope this helps. RUBYLIB looks suspect.
/usr/bin/env
MANPATH=/sw/share/man:/usr/local/share/man:/usr/local/mysql/man:/opt/ local/share/man:/opt/local/man:/usr/share/man:/usr/X11R6/man:/sw/lib/ perl5/5.8.6/man SHELL=/bin/bash TM_INPUT_START_LINE_INDEX=0 PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin TM_LINE_INDEX=12 TM_MODE=Plain Text TM_SCOPE=text.plain meta.paragraph.text SGML_CATALOG_FILES=/sw/etc/sgml/catalog USER=ryan TM_COLUMNS=114 SSH_AUTH_SOCK=/tmp/501/SSHKeychain.socket TM_SELECTED_TEXT=/usr/bin/env __CF_USER_TEXT_ENCODING=0x1F5:0:0 TM_CURRENT_LINE=/usr/bin/env PATH=/Applications/TextMate.app/Contents/SharedSupport/Support/bin/ CocoaDialog.app/Contents/MacOS:/sw/bin:/sw/sbin:/Users/ryan/bin:/usr/ local/bin:/usr/local/mysql/bin:/opt/local/bin:/opt/local:/bin:/sbin:/ usr/bin:/usr/sbin:/usr/X11R6/bin:/Applications/TextMate.app/Contents/ SharedSupport/Support/bin HGUSER=Ryan King http://theryanking.com/ TM_COLUMN_NUMBER=13 XML_CATALOG_FILES=/sw/etc/xml/catalog PWD=/Users/ryan/microformats/tests EDITOR=tm_wait TM_SUPPORT_PATH=/Applications/TextMate.app/Contents/SharedSupport/ Support SHLVL=2 HOME=/Users/ryan CVS_RSH=ssh LC_CTYPE=en_US.UTF-8 INFOPATH=/sw/share/info:/sw/info:/usr/share/info TM_CURRENT_WORD=env TM_SOFT_TABS=YES RUBYLIB=/Applications/TextMate.app/Contents/SharedSupport/Support/lib SECURITYSESSIONID=a93670 TM_INPUT_START_LINE=1 TM_LINE_NUMBER=1 TM_TAB_SIZE=2 _=/usr/bin/env
-ryan
AFAIK, RUBYLIB is an additional search path that kicks in for ruby -S, so that should be OK ...
Seems you have both DarwinPorts and Fink installed. Use the same path as you have above and run your ruby scripts on the command line to see what happens.
-- G.
On 6/19/06, Ryan King ryan@theryanking.com wrote:
On Jun 18, 2006, at 8:01 PM, Guido Sohne wrote:
If you run the following, what's the output?
#!/usr/bin/env env
Hope this helps. RUBYLIB looks suspect.
/usr/bin/env
MANPATH=/sw/share/man:/usr/local/share/man:/usr/local/mysql/man:/opt/ local/share/man:/opt/local/man:/usr/share/man:/usr/X11R6/man:/sw/lib/ perl5/5.8.6/man SHELL=/bin/bash TM_INPUT_START_LINE_INDEX=0 PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin TM_LINE_INDEX=12 TM_MODE=Plain Text TM_SCOPE=text.plain meta.paragraph.text SGML_CATALOG_FILES=/sw/etc/sgml/catalog USER=ryan TM_COLUMNS=114 SSH_AUTH_SOCK=/tmp/501/SSHKeychain.socket TM_SELECTED_TEXT=/usr/bin/env __CF_USER_TEXT_ENCODING=0x1F5:0:0 TM_CURRENT_LINE=/usr/bin/env PATH=/Applications/TextMate.app/Contents/SharedSupport/Support/bin/ CocoaDialog.app/Contents/MacOS:/sw/bin:/sw/sbin:/Users/ryan/bin:/usr/ local/bin:/usr/local/mysql/bin:/opt/local/bin:/opt/local:/bin:/sbin:/ usr/bin:/usr/sbin:/usr/X11R6/bin:/Applications/TextMate.app/Contents/ SharedSupport/Support/bin HGUSER=Ryan King http://theryanking.com/ TM_COLUMN_NUMBER=13 XML_CATALOG_FILES=/sw/etc/xml/catalog PWD=/Users/ryan/microformats/tests EDITOR=tm_wait TM_SUPPORT_PATH=/Applications/TextMate.app/Contents/SharedSupport/ Support SHLVL=2 HOME=/Users/ryan CVS_RSH=ssh LC_CTYPE=en_US.UTF-8 INFOPATH=/sw/share/info:/sw/info:/usr/share/info TM_CURRENT_WORD=env TM_SOFT_TABS=YES RUBYLIB=/Applications/TextMate.app/Contents/SharedSupport/Support/lib SECURITYSESSIONID=a93670 TM_INPUT_START_LINE=1 TM_LINE_NUMBER=1 TM_TAB_SIZE=2 _=/usr/bin/env
-ryan
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