Sublime Forum

Ruby/Rails

#1

Will Sublime work with Jruby, Ruby and Ruby on Rails ?

0 Likes

#2

Yes, I do all of my Jruby on Rails development in Sublime. I use a couple of Textmate bundles including the awesome “Ryan on Rails” bundle which dramatically reduces the amount of typing I have to do.

Just open the Rails project folder, and save it as a Sublime project.

There are no specific “Start webrick” type buttons like you’d get with Netbeans or Rubymine… but, I also know how to type “rails s” at a command prompt :wink:

0 Likes

#3

Currently I find working with rails in TextMate much easier than ST2, the bundles in TextMate out of the box are really nice, even running tests etc. I hope ST2 will have better built in support for rails in the future, I find typing <%= etc gets old real fast and yes I know there is a 3rd party package erb something or other. I’m guessing the only way I’m going to get ST2 to work as well as TextMate is to port the Rails bundle if its possible to just use it as is? (I really dont want to spend hours configuring my editor!), and I dont want to use a community edited version. If I can port the TextMate version then ok, if not then I’ll wait to see if the Sublime team add better rails support in future releases.

While I think ST2 is a good general purpose editor I really dont understand all the hype, compared to TextMate which is really starting to show its age now I find ST2 out of the box lacking! Its nicer looking than TextMate and has some nice features like split screen (which I almost never use) but it seems unless you install a bunch of community extensions it lacks a lot of functionality. As I’m relatively new to ST2 then I may be missing something, in which case I’m happy to be wrong. But so far I’ve been a little frustrated and its messed with my workflow, so I keep jumping back to TextMate.

0 Likes

#4

Yeah, the ERB plugin just drops right in. You can then type ‘fftf’ for example to get a form for textfield, or ‘ffl’ to get a form for label. The editor adds the <%= %> for you.

But if you’re doing something else, it doesn’t take more than 30 seconds to add a snip to create those symbols. I added ‘r’ to expand to <% %> and ‘re’ to expand to <%= %> and throw the cursor in the middle. (I got used to this shortcut when I was using Netbeans back in the day)

create a file called re.sublime-snippet and put this in there:

<snippet> <content><![CDATA[<%= $1 %>]]></content> <tabTrigger>re</tabTrigger> <scope>text.html.ruby, text.haml</scope> <description>open echo tag</description> </snippet>

There’s really no hours of configuration involved.

0 Likes

#5

Thanks nobleach, I appreciate your help.

The problem is I don’t want to create my own snippets, i never had to with TextMate and I was looking for a direct replacement. I was happy to pay the license fee for ST2 but I’m not interested in relying on community plugins, so my point is that until I can use ST2 as a direct replacement for TextMate out of the box, it doesn’t give me anything. The only way I can see to get some use out of it is if I can port the rails bundle from TextMate, I’ve been looking on google to see if this is possible but not found anything concrete so far.

At the end of the day I wasn’t looking for a free, community or hobbyists development tool. I was looking for a professional developers editor that supports rails development out of the box with the same or better feature set I had in TextMate. It seems that what most people like about ST2 which is the community plugins etc I have no interest in at all. I’d prefer to get any updates from the people I paid for the software.

0 Likes

#6

I haven’t used TextMate so take everything I say with a grain of salt. I thought I had read that TextMate bundles could be dropped into Sublime Text with no fuss (source). See tip 11. The tricky thing with Sublime Text is that, as far as I know, the “company” we are paying for the editor is really just 1 person, so leveraging community plugins isn’t necessarily a bad thing. Though I do understand that the quality of community plugins can, shall we say, vary, along with inconsistent support.

Anyways, really just wanted to mention the bundle thing. Prior to sublime text, I used VIM/Notepad++ depending on the platform, though I still do use both of those on occasion. This editor provides me some consistency across the various machines I use. Anyways, don’t have an OS X machine, so definitely don’t know much about TextMate (bundles), or anything else OS X specific for that matter.

0 Likes

#7

Hi skuroda, thanks for your reply,

I didn’t realise that there was just one developer behind ST2, in which case I can see why he/she decided to allow the community to add extensions. I also completely agree with your point on quality and support which is where most of my concerns are based. I think I’d been waiting so long for TextMate 2 that when I came across ST2 I had high hopes I’d found its replacement.

I’ve read that TexMate bundles can be ported and I’ve been looking into the possibility of using the built in TextMate 1.5 rails bundle in ST2, but I cant find a rails bundle file in the TextMate Library folders. Looking in the TextMate Bundle editor there are a load of individual rails snippets that make up the bundle, and copying the source one by one would be a time consuming task.

However I’m still hopeful that ST2 will start to include the features I’m looking for in future releases :wink:

0 Likes