Wednesday, January 29, 2014

Ubuntu 13.10 Gedit Plugins Won't Load

Background


I've seen this topic addressed sparsely across the web, mostly technical details of this Python library and that Gedit source patch. If you're anything like me, you just want to solve the problem and move on.

The scenario is that I use Ubuntu 13.10, Gedit, and various other tools for development...primarily with regard to Ruby on Rails. There is a package out there called "gedit-gmate" which attempts to make Gedit act and perform more like TextMate. While I don't subscribe to the notion that all ROR developers have use (or simulate the use of) TextMate, there are several plugins that I find helpful.

So, what's the problem?


Well, in at least this release of Ubuntu (13.10, and probably in others) several of the plugins that I want to use will not load in Gedit, giving an error such as "could not find loader 'python'". Here's an example using the "Raisl File Loaded" plugin.


And, the solution?

The pragmatic way to solve this problem seems to be the following...
  • Locate the plugin directory on your machine. For me, it's /usr/lib/gedit/plugins/. Each plugin has its own subdirectory, named accordingly. Inside that subdirectory, you will find a file with the extension ".plugin".




  • Using "sudo", open the file with your favorite editor (for me, although I use Gedit for development, I prefer vim for these sorts of tasks).
  • Update the offending loader statement, e.g. "Loader=python", with the newer version, "Loader=python3".
  • Close/re-open Gedit and re-try activation of the plugin. 
 

Voila! In most cases, this simple change will correct the issue. In some, e.g. ZenCoding, it will not.
If you've found this post useful, check back again soon!