New Version of SublimeERB Released

June 18, 2013 — 17 Comments

2 years ago I started using Sublime Text 2 instead of Textmate. It was a relatively painless transition but there was one thing that I used often in Textmate that wasn’t available in Sublime Text, inserting, toggling and wrapping content in ERB tags.

Since adoption of Sublime Text was relatively new at the time, I decided to scratch my own itch and write a plugin in Python for Sublime Text. After a few of days, I released SublimeERB on Github. There was one thing that I never did get around to and that is toggling ERB tags once something was selected.

Today I merged in a pull request from Anthony Dmitriyev (ANTStorm on Twitter and Github). This latest update adds the feature that allows toggling ERB tags when text is selected as well as multi-line support.

Thanks again to all of the contributors!


Installing REE with rbenv with iconv support and Homebrew

December 28, 2011 — 0 Comments

I picked up a new Mac Mini recently and have been experimenting with rbenv instead of RVM. For some reason, one of my projects was giving me the following error when attempting to start the project (through the Rails console and through pow as well).

    ...action_controller/cgi_ext/stdinput.rb:14:in `included': undefined method `alias_method_chain' for CGI:Class (NoMethodError).

This error comes up when the Ruby version that you’re using isn’t compiled with iconv support. With rbenv, you can compile iconv support with the following command:

    CONFIGURE_OPTS="-c --with-iconv-dir=/usr/local/Cellar/libiconv/1.14" rbenv install ree-1.8.7-2011.03    

I should note that I lost quite a bit of time trying to target libiconv with version 1.13. I don’t know if this is a problem with libiconv 1.13 or it was something with my specific version, but once I upgraded to version 1.14, I was able to make it work.

Building that Pesky Nokogiri Gem When Using Homebrew

August 22, 2011 — 0 Comments

I’ve encountered the following error (and those like it) many, many times when setting up existing projects that use Nokogiri in conjunction with Homebrew. Every single time I encounter it, I have to sort through my history to try to find out how I solved it.

So this post is as much a reminder to myself as it is to other people experiencing the same issue.

When attempting to install the Nokogiri gem you might get an error similar to this:

Installing nokogiri (1.4.4) with native extensions 
/Users/carlos/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/installer.rb:551:in `build_extensions': 
ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/Users/carlos/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... no

Here are the instructions that I use to solve the issue:

    brew install libxml2
    brew install libiconv
    brew link libiconv