Results 1 to 5 of 5
  1. #1
    How to change version of Ruby being run in TextWrangler?

    Member Since
    Feb 12, 2013
    Posts
    3
    How to change version of Ruby being run in TextWrangler?
    Hi there..
    I am using textwrangler to write ruby scripts, and it goes just fine, except for:
    it uses the 1.8.7 version and not the 1.9.3 that i have installed via rvm.

    i have read on the TW manual that i should write a "shebang" line pointing to where the new ruby version is,
    I type this :
    #!/Users/Bus/.rvm/rubies/ruby-1.9.3-p362/bin/irb:16:in `<main>'1.9.3p362
    but TW is still using the old version.

    Any ideas??

    thanks a lot

    p

  2. #2
    How to change version of Ruby being run in TextWrangler?
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,398
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    You've got quite the complicated shebang line there. Let's simplify that a bit:
    Code:
    #!/Users/Bus/.rvm/rubies/ruby-1.9.3-p362/bin/irb
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  3. #3
    How to change version of Ruby being run in TextWrangler?

    Member Since
    Feb 12, 2013
    Posts
    3
    Quote Originally Posted by vansmith View Post
    You've got quite the complicated shebang line there. Let's simplify that a bit:
    Code:
    #!/Users/Bus/.rvm/rubies/ruby-1.9.3-p362/bin/irb
    thank you vansmith!
    i have made it as you suggested, but still, when further down on my script i type
    "puts RUBY_VERSION"
    it returns the 1.8.7 old one.

    and in fact, i still can't use a method (.force_encoding) wich is only available in the newer ruby version.

    thank you!!!
    (and apllogizes if i am not following the right way to answer or communicate... i'm totally new to this type of forums.)

    p

  4. #4
    How to change version of Ruby being run in TextWrangler?
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,398
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    I'm going to guess that the RUBY_VERSION env variable still returns 1.8.7 because the shebang line doesn't actually change that.

    Read p. 227 here.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  5. #5
    How to change version of Ruby being run in TextWrangler?

    Member Since
    Feb 12, 2013
    Posts
    3
    Quote Originally Posted by vansmith View Post
    I'm going to guess that the RUBY_VERSION env variable still returns 1.8.7 because the shebang line doesn't actually change that.

    Read p. 227 here.
    thank you so much...
    this is pretty amazing, you answering so quickly :-)

    yes... I had read the TW manual before and it states that one should do it that way (with the shebang line)...

    what i don't really understand is why, running the script in terminal it accepts the .force_encoding method and returns the new ruby version,
    while running it in TW it doesn't accept the method and returns the old version...
    it seems to me that that TW it's not really using the new.

    any way, thank you very much for you time and attention.

    best!

    p

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Reviving ole Ruby: Ruby Slot G3 needs tcp/ip
    By cognus in forum Apple Desktops
    Replies: 12
    Last Post: 10-22-2012, 12:31 PM
  2. What is the earliest version of photoshop I can run?
    By Atari Boy in forum OS X - Apps and Games
    Replies: 4
    Last Post: 08-05-2011, 08:17 AM
  3. unable to run firefox version 4
    By chdche24 in forum OS X - Apps and Games
    Replies: 3
    Last Post: 04-16-2011, 02:04 AM
  4. [Need help] can PowerBook G4 run Matlab? Which version?
    By Saoekolak in forum OS X - Apps and Games
    Replies: 7
    Last Post: 03-19-2010, 12:49 PM
  5. Run Windows version of MS Office ?
    By diggerbarnes in forum Running Windows (or anything else) on your Mac
    Replies: 11
    Last Post: 10-29-2008, 09:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •