Home Download Buy Blog Forum Support

"build" / execute ruby code

"build" / execute ruby code

Postby johntdyer on Wed Feb 08, 2012 3:47 am

A nice feature of textmate was the ability to run a block of ruby directly inside the editor, and I would love to know if this is possible in Sublime2?

Thanks

-John
johntdyer
 
Posts: 9
Joined: Sun Jan 29, 2012 4:38 pm

Re: "build" / execute ruby code

Postby johntdyer on Fri Feb 17, 2012 10:06 pm

Anyone?
johntdyer
 
Posts: 9
Joined: Sun Jan 29, 2012 4:38 pm

Re: "build" / execute ruby code

Postby johntdyer on Fri Mar 02, 2012 2:13 pm

<bump>
johntdyer
 
Posts: 9
Joined: Sun Jan 29, 2012 4:38 pm

Re: "build" / execute ruby code

Postby johntdyer on Fri Mar 02, 2012 2:25 pm

Figured this out,

Edit ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Ruby/Ruby.sublime-build

Code: Select all
{
    "cmd": ["/Users/<username>/.rvm/bin/rvm-auto-ruby", "$file"],
    "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
    "selector": "source.ruby"
}


Then it builds

-John
johntdyer
 
Posts: 9
Joined: Sun Jan 29, 2012 4:38 pm

Re: "build" / execute ruby code

Postby johntdyer on Wed Mar 07, 2012 4:09 pm

Question on this, Is there any way to execute code w/o having to save the file ? You dont have to save the file in TextMate and I would love the same for Sublime2
johntdyer
 
Posts: 9
Joined: Sun Jan 29, 2012 4:38 pm

Re: "build" / execute ruby code

Postby wuub on Wed Mar 07, 2012 4:46 pm

Tried SublimeREPL?
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: "build" / execute ruby code

Postby ralphschindler on Wed Mar 07, 2012 5:05 pm

I've just written a small plugin to do this for PHP, perhaps it can help you:

https://github.com/ralphschindler/Sublime-PHP-Extras

-ralph
ralphschindler
 
Posts: 2
Joined: Wed Mar 07, 2012 5:03 pm


Return to General Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 22 guests