Hi guys,
I get errors when I try to run some Ruby scripts in TM. NB: I don't have those errors when I run these scripts in Bash (even from inside TM) or in IRB I have "TM_RUBY /usr/local/bin/ruby" in my shell variables.
e.g.
When using erb (example taken from Programing Ruby):
--------- #!/usr/local/bin/ruby
require 'erb'
input = %{\ <% high.downto(low) do |n| # set high, low externally %> <%= n %> green bottles, hanging on the wall <%= n %> green bottles, hanging on the wall And if one green bottle should accidentally fall There'd be <%= n-1 %> green bottles, hanging on the wall <% end %> } high,low = 10, 6 erb = ERB.new(input) erb.run
-----------
I get: RubyMate r2496 running Ruby v1.8.4.
~/bin/test.rb
/Library/Application Support/TextMate/Bundles/Ruby.tmbundle/Support/ tmruby.rb:180: bad value for range (ArgumentError) from /Library/Application Support/TextMate/Bundles/Ruby.tmbundle/ Support/tmruby.rb:120
=========================================== When using 'sqlite3': ----------- #! /usr/local/bin/ruby
require 'sqlite3'
db = SQLite3::Database.new( "/Users/fatal/bin/test.db" )
p db.execute( <<-SQL SELECT * FROM posts; SQL )
db.close -----------
I get:
RubyMate r2496 running Ruby v1.8.4.
~/bin/jots/test2.rb
(eval):5: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [powerpc- darwin8.4.0] Program exited with return code.
NB: This script works, but I get the error, sometimes scripts using sqlite3 doesn't work at all, sometimes I only get "Program exited with return code."
I have other errors of this kind, but examples are more complicated to share or I didn't take note of them.
Am I missing something? Thanks for any tips.
- Fred