Politics, Programming and Possibilities
26 Feb
My friends on IRC have helped me track down and understand better the way TextMate helps its bundles by setting up the environment for Ruby code. The Rails bundle now uses the TM_RUBY environment variable to determine which ruby on your system to use (i.e. if you have multiple ruby shell commands installed).
One of the biggest problems with this environment stuff has been trying to figure out the best way to support all of the many ways you can get Ruby on your system: the built-in version patched with fixrbconfig, DarwinPorts, your own version, or perhaps even Locomotive’s ruby-in-a-box. For those of you who’ve been experiencing problems with past versions of the Rails bundle, I think this one may fix it for you. If you’re still having problems, try adding a TM_RUBY environment variable to your TextMate shell variables (in Preferences, go to Advanced, then Shell Variables). Point TM_RUBY to the location you installed ruby at.
As usual, please feel free to contact me and we can try to work out a solution if you’re still having trouble. Comments showing your problems or solutions are also welcome.
2 Responses for "Rails Bundle for TextMate 1.0 RC3"
I have nothing but troubles since the RC1 days. The intelligent go to file throws all kind of interesting error messages:
/Users/jcf/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Support/lib/rails/rails_path.rb:19:in `method_missing’: undefined method `controller?’ for # (NoMethodError)
from /Users/jcf/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Support/bin/intelligent_go_to_file.rb:202
Also, the keybinding for this allways seems to be the ENTER key.
The migrations “mnrc” for example throw these errors:
/Users/jcf/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Support/bin/intelligent_migration_snippet.rb:28:in /bin/bash: +’: invalid option
Usage: /bin/bash [GNU long option] [option] …
/bin/bash [GNU long option] [option] script-file …
GNU long options:
–debug
–dump-po-strings
–dump-strings
–help
–init-file
–login
–noediting
–noprofile
–norc
–posix
–rcfile
–restricted
–verbose
–version
–wordexp
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o optionindent’
from /Users/jcf/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Support/bin/intelligent_migration_snippet.rb:68:in /bin/bash: -c: line 1: unexpected EOF while looking for matching `”
/bin/bash: -c: line 3: syntax error: unexpected end of fileeach_with_index’
from /Users/jcf/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Support/bin/intelligent_migration_snippet.rb:65:in /bin/bash: -c: line 1: unexpected EOF while looking for matching `”
/bin/bash: -c: line 3: syntax error: unexpected end of fileeach_with_index’
from /Users/jcf/Library/Application Support/TextMate/Bundles/Rails.tmbundle/Support/bin/intelligent_migration_snippet.rb:65:in
Jens-Christian: Thanks for the feedback–you’ve helped me nail down some old bugs that I’d forgotten about. Download RC4 and see if this gives you any relief.
Please also read my post about why the ‘enter’ key isn’t going to work by default in the new release.
Leave a reply