Why do I sometimes get xcode messages when using cmd R to run ruby code? If I click somewhere else in the document and then use cmd R, then it usually runs the code in the file without the xcode error.
Right now though, nothing I do is working. I'm getting
xcodebuild: Error: the directory /Users/xxxx/Desktop does not contain an Xcode project.
every time I try cmd R.
On 01.04.2009, at 07:30, rburrowes wrote:
Why do I sometimes get xcode messages when using cmd R to run ruby code? If I click somewhere else in the document and then use cmd R, then it usually runs the code in the file without the xcode error.
Right now though, nothing I do is working. I'm getting
xcodebuild: Error: the directory /Users/xxxx/Desktop does not contain an Xcode project.
every time I try cmd R.
Did you set the language grammar of your Ruby file to "Ruby"? ⌘R behaves different according to the set language. If a language grammar/bundle has no ⌘R specified it falls back a tmCommand which has that key shortcut set to no scope. ⌘R in the Xcode bundle is such a tmCommand. Thus make sure that your language is set, in your case, to "Ruby"
--Hans
I think the language is set to Ruby. It has Ruby selected in the pop up at the bottom of the page. It also executes ruby most of the time. Just not all the time. Today it is running xcode 100% of the time, which is why I posted the message. Before it would go away. Same files, and not closed between working and not working, then working again.
Hmm.
-activate your Ruby file in question -press ^⌘T -click at the magnifier and choose “Key equivalent” -type in to the search field ⌘R
what does come up?
next: Disable the Xcode bundle in the Bundle Editor [Filter] and try it again. What happens?
--Hans
left clicking on the magnifier does nothing. Right clicking gives a pop up menu, but it doesn't have "key equivalent" as an option?
So I checked the Ruby bundle using the Bundle Editor instead and found that it no longer has a run option! I see it in the older copy on my laptop, but on this iMac, it just isn't there. Neither is the "Run Focused Unit Test". Given your earlier reply, this would explain the fall back to xcode.
Somehow the Ruby bundle got corrupted since shutting down last night and starting up today. Possibly earlier I suppose, as this machine has had Textmate running continuously for weeks, so it could be that I only saw this after restarting the program, but the corruption of the disk copy may have occurred earlier and I didn't see it until restarting.
The only non-standard thing I have done is install the Git bundle for Textmate. That was a few weeks ago now. Quite probably just before the last time I restarted textmate. There may or may not be a relationship.
I'll do a disk check as well. I suppose it could be disk corruption of some sort.
I just trashed the copy on this machine, downloaded a new version, and all is well (and it is the same version I was running before (Version 1.5.8 (1498))).
Now that I think on it, I have had one other odd thing happen. My Ruby code seems to cause problems when writing to the output window. I print a longish multi-line string and get an error at the 11th line.
"at top level in 3 TIME 15 at line 56"
The same string, printed to a file, outputs correctly. the "3 TIME 15" is the first part of the 11th line. I can get the error consistently, before and after printing the string to a file and the file copy is always right. I also don't see the error if I run the Ruby code on the command line. Could I be overflowing a buffer somewhere and trashing something I shouldn't be. Seems unlikely though, and I can't reproduce a corruption of the bundle this way.
Hans-Jörg Bibiko wrote:
Hmm.
-activate your Ruby file in question -press ^⌘T -click at the magnifier and choose “Key equivalent” -type in to the search field ⌘R
what does come up?
next: Disable the Xcode bundle in the Bundle Editor [Filter] and try it again. What happens?
--Hans
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Apr 1, 2009, at 2:15 AM, rburrowes wrote:
Now that I think on it, I have had one other odd thing happen. My Ruby code seems to cause problems when writing to the output window. I print a longish multi-line string and get an error at the 11th line.
"at top level in 3 TIME 15 at line 56"
The same string, printed to a file, outputs correctly. the "3 TIME 15" is the first part of the 11th line. I can get the error consistently, before and after printing the string to a file and the file copy is always right. I also don't see the error if I run the Ruby code on the command line. Could I be overflowing a buffer somewhere and trashing something I shouldn't be. Seems unlikely though, and I can't reproduce a corruption of the bundle this way.
Example code so I can reproduce it?
The code is on Rubyforge in
http://gedcom.rubyforge.org/git?p=gedcom.git%3Ba=tree
Or via git using
git clone git://rubyforge.org/gedcom.git
I could email you a copy if you wanted. It is about 500K. I haven't sat down and tried to work out the minimum code that will generate the error.
Running test/gedcom, after removing the comments from around lib/gedcom/transmission.rb's summary method, will print the string, print the string to /tmp/xx.txt and print the string again. Both prints give the error, but the file copy is correct.
The string is produced calling f.to_gedcom, which is a method in lib/gedcom/gedcom_base.rb. This actually walks through all the other objects that were created from the classes in lib/gedcom/*.rb. It isn't that easy to follow.
The error will go away if @@tabs = false, rather than true. This stops the leading spaces being added to the lines in the string (in method GedcomBase.tabstop in gedcom_base.rb). The line " 3 Time ..." becoming "3 TIME ...". The error is there for Ruby 1.8.6 and Ruby 1.9.1.
Alex Ross-8 wrote:
On Apr 1, 2009, at 2:15 AM, rburrowes wrote:
Now that I think on it, I have had one other odd thing happen. My Ruby code seems to cause problems when writing to the output window. I print a longish multi-line string and get an error at the 11th line.
"at top level in 3 TIME 15 at line 56"
The same string, printed to a file, outputs correctly. the "3 TIME 15" is the first part of the 11th line. I can get the error consistently, before and after printing the string to a file and the file copy is always right. I also don't see the error if I run the Ruby code on the command line. Could I be overflowing a buffer somewhere and trashing something I shouldn't be. Seems unlikely though, and I can't reproduce a corruption of the bundle this way.
Example code so I can reproduce it?
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate