Ph values

Stephan on testing, software (good and bad), Ruby and the world at large

Posts Tagged ‘TextMate’

TextMate 1.5.10 … and Ruby 1.9.2

Posted by Stephan on 13. November 2010

There’s a new version of Textmate available. Cool, thanks! However after installing … I couldn’t run Rake tasks anymore (the keyboard short cut to remember: Shift-Ctrl-R).

In ‘rake_mate.rb’ (line 49, /Applications/TextMate.app/Contents/SharedSupport/Bundles/Ruby.tmbundle/Support/RakeMate/rake_mate.rb). I inserted “.lines” to make it look like this:

tasks = [DEFAULT_TASK] + tasks.lines.grep(/^rake\s+(\S+)/) { |t| t.split[1] }

Additionally I had to ‘re-copy’ the plist.bundle as described on the rvm site.
Now everything works fine again.

Addendum: As mentioned in the rvm guide to using TextMate, I had to (re) move TextMate’s own Builder.rb out of the way:

cd /Applications/TextMate.app/Contents/SharedSupport/Support/lib/ ; mv Builder.rb Builder.rb.backup

Posted in Programming, Uncategorized | Tagged: , | Leave a Comment »

More RVM, TextMate, Ruby and (!) Rails godness

Posted by Stephan on 9. November 2010

Here’s another article on the topic of rvm, Textmate, Ruby & Rails: Blended Musings (http://blendedmusings.blogspot.com/2010/10/getting-rvm-textmate-ruby-187-and-192.html)

Posted in Programming, Ruby, Uncategorized | Tagged: , , , | Leave a Comment »

Another note to self: RVM, TextMate and Ruby 1.9.2

Posted by Stephan on 8. November 2010

Getting rvm and Ruby 1.9.2 and TextMate can be a bit of work, especially if you’re using rake as well inside TextMate.

Good Thing there’s a solution already: Jim blogged about it at “RVM, ruby 1.9 and TextMate“. Thanks Jim!

 

Posted in Programming, Ruby | Tagged: , , , | Leave a Comment »

TextMate, Ruby & String Interpolation

Posted by Stephan on 7. November 2007

While preparing some code example for the Euruko 2007 I noticed a somewhat strange behaviour of TextMate while editing Ruby code. With the Ruby bundle being active, I expect CMD-R (“Apple-R”) to execute the Ruby code a hand. Which it does, unless the text cursor is inside a string interpolation expression.

An example: The first screen shot shows the example code, the cursor being positioned outside the #{ … }.

cursor_outside_srint_interpol.png

After CMD-R is hit, the output is the expected Ruby output as shown below.

outside_result.png

However, if the cursor is inside the string interpolation expression as below

cursor_inside_print_interpol.png

the result of hitting CMD-R doesn’t meet my expectation:


inside_result.png

I wonder why this happens. Apparently the behaviour has to do the the scope the cursor is in. A hint about how to avoid this is greatly appreciated.

Posted in Uncategorized | Tagged: , , | 3 Comments »

 
Follow

Get every new post delivered to your Inbox.