Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9178643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:36:04+00:00 2026-06-17T17:36:04+00:00

In TextMate 2, Execute and Update ‘# =>’ Markers menu action updates the markers

  • 0

In TextMate 2, Execute and Update ‘# =>’ Markers menu action updates the markers in the following code as if I am running ruby 1.8 even though my TM_RUBY environment variable is set to ~/.rvm/rubies/ruby-1.9.3-p286/bin/ruby:

v = RUBY_VERSION # => "1.8.7"
puts "".singleton_class
puts v
# ~> -:2: undefined method `singleton_class' for "":String (NoMethodError)

Running the same code in TextMate 2, on the other hand, returns the expected command output:

#<Class:#<String:0x007fcf418941b8>>
1.9.3

This is a wonderful feature and it would be a real shame if it is limited to ruby 1.8. I suspect, however, that this may be peculiar to my setup (I have actually seen it work with 1.9 code here: http://ruby-kickstart.com/). Execute and Update ‘# =>’ Markers menu action is defined in the Ruby bundle where it calls xmpfilter from rcodetools:

#!/usr/bin/env bash

[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"

export RUBYLIB="$TM_BUNDLE_SUPPORT/vendor/rcodetools/lib${RUBYLIB:+:$RUBYLIB}"
export TM_RUBY=$(which "${TM_RUBY:-ruby}")

"${TM_RUBY}" -r "${TM_SUPPORT_PATH}/lib/ruby1.9/add_1.8_features.rb" -- "$TM_BUNDLE_SUPPORT/vendor/rcodetools/bin/xmpfilter"

The file add_1.8_features.rb only adds a few legacy methods to the String and File classes (e.g. grep and remove). Indeed, this enables it to support ruby 1.9 (see https://github.com/textmate/ruby.tmbundle/blob/master/Support/vendor/rcodetools/CHANGES).

At this point I am not even quite sure where does ruby 1.8 come from in the first place. Even passing the explicit path to the latest ruby instead of “${TM_RUBY}” in the last line above does not change the output.

I would be very grateful for any help that would allow me to use this (or equivalent) menu action in TextMate.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:36:05+00:00Added an answer on June 17, 2026 at 5:36 pm

    This is a good reference.

    http://cl.ly/23Ylhttp://cl.ly/23Yl/rvm_textmate.png

    Make sure you are running all the new versions.

    Out of the box, rvm ships with a ruby binary, typically in ~/.rvm/bin (or, in system wide installs, inside of /usr/local/bin), that will perform the following steps before executing ruby:

    Load up RVM
    Look for any RVMRC files and load them
    Execute as a normal ruby
    

    This approach makes it possible to have the ruby switched on a per-project basis without any extra work. With rvm installed, this is a matter of taking the full path to rvm-auto-ruby, found via:

    $ which rvm-auto-ruby

    And in the advanced section of the textmate preferences, either adding or changing the TM_RUBY variable to point to the given path, like shown in this screenshot with an example installation.

    Source: https://rvm.io/integration/textmate/

    FWIW: Josh Cheek is great (rubykickstart)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm modding a TextMate bundle even though I'm a complete beginner at Ruby. The
I used textmate to work with ruby code for over one year. Recently I
Hey is there a way or plugin to execute Code e.g. Ruby in my
My textmate suddenly stopped recognizing comments in code and the shortcut for commenting out
I've been using Textmate for Ruby/Python scripting for awhile and now have a need
I have Textmate 1.5.7 running on my leopard machine. When programming in rails, for
TextMate has a nice feature that allows you to execute a script from within
It may help if you are on a Mac and use TextMate, though not
In the Textmate code-editor I use the Escape-key, for word completion, alot. Is there
I currently use TextMate for Ruby/Javascript/Actionscript development and it is amazing. But one thing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.