July 2010
M T W T F S S
« Jun    
 1234
567891011
12131415161718
19202122232425
262728293031  
86

Categories

Archives

Fixing Ruby Support in Vim on Fedora 10, 11, and CentOS 5 & Installing the Vim Textile plugin

Background

A while back I was trying to get the vim textile plugin installed and ran into a problem. Apparently the vim that’s included with Fedora 10, 11, and CentOS 5 doesn’t include ruby support. This bug report explains what’s wrong with vim and how it’s missing ruby support. The problem is visible with this command:

1
2
3
4
% vim --version | grep ruby
+printer +profile +python +quickfix +reltime +rightleft -ruby +scrollbind 
...
...

The –ruby tells us that ruby support isn’t enabled. The only solution I’ve seen thus far is to rebuild vim. Not really a huge deal but it’s work non the less 8-).

Rebuilding vim with ruby support

Here’s how I fixed it.

download vim Source RPM (SRPM)

1
% wget http://mirrors.xmission.com/fedora/updates/10/SRPMS/vim-7.2.148-1.fc10.src.rpm

confirm that ruby is installed

1
2
3
4
5
6
% yum list installed ruby*|column -t|grep ruby
ruby.i386        1.8.6.287-2.fc10  installed
ruby-devel.i386  1.8.6.287-2.fc10  installed
ruby-irb.i386    1.8.6.287-2.fc10  installed
ruby-libs.i386   1.8.6.287-2.fc10  installed
ruby-rdoc.i386   1.8.6.287-2.fc10  installed

make sure you have your own rpmbuild directory

1
2
3
4
% mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
 
# caution with this second command if you already have your own .rpmmacros, this will overwrite!
% echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros

rebuild vim / re-install vim

1
2
rpmbuild --rebuild vim-7.2.148-1.fc10.src.rpm
rpm --force -Uvh /root/rpmbuild/RPMS/i386/vim-{c,e,m,X}*

check that vim now has ruby support

1
2
3
4
% vim --version | grep ruby
+printer +profile +python +quickfix +reltime +rightleft +ruby +scrollbind 
...
...

Ahh. a +ruby means it worked.

Textile Plugin for vim

Now onto installing the vim textile plugin.

First things first, we need to install rubygems

1
% yum install rubygems

Next we need to install the RedCloth gem, it’s required by the textile plugin

1
2
3
4
5
6
% gem install RedCloth
Building native extensions.  This could take a while...
Successfully installed RedCloth-4.2.2
1 gem installed
Installing ri documentation for RedCloth-4.2.2...
Installing RDoc documentation for RedCloth-4.2.2...

Finally, install the textile plugin

Downloading the textile plugin from here,


…. Continue reading → Fixing Ruby Support in Vim on Fedora 10, 11, and CentOS 5 & Installing the Vim Textile plugin »»

Installing Trac on CentOS 5

I started installing trac a few days ago on one of my OpenVZ VE instances running CentOS 5. I got to the point where I needed to install the gitPlugin when I realized, oh crap, I need Python 2.5. Installing major upgrades to python can be a bit of a pain. Especially on RedHat flavored distros. So I setup a separate OpenVZ VE instance just to try out doing an install of Python 2.5 along side my existing Python 2.4 install. Refer to my previous post about installing Python 2.5 on CentOS 5.

So this is the moment of truth. Installing Trac and all it’s plugins so that they are using the 2.5 install.

Point python to python25
1
% alias python=/usr/bin/python25

That was easy enough.

Trac

So now lets install Trac. I’m going to use easy_install to do this. This gives me the latest version that’s available, 0.11.3. Doing it this way will automatically install Genshi for me as well.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
% easy_install trac
Searching for trac
Reading http://pypi.python.org/simple/trac/
Reading http://projects.edgewall.com/trac
Reading http://projects.edgewall.com/trac/wiki/TracDownload
Reading http://trac.edgewall.com/
Best match: Trac 0.11.3
Downloading ftp://ftp.edgewall.com/pub/trac/Trac-0.11.3.zip
Processing Trac-0.11.3.zip
Running Trac-0.11.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_WZSG4/Trac-0.11.3/egg-dist-tmp-TCkvCy
Adding Trac 0.11.3 to easy-install.pth file
Installing trac-admin script to /usr/bin
Installing tracd script to /usr/bin
 
Installed /usr/lib/python2.5/site-packages/Trac-0.11.3-py2.5.egg
Processing dependencies for trac
Searching for Genshi>=0.5
Reading http://pypi.python.org/simple/Genshi/
Reading http://genshi.edgewall.org/
Reading http://genshi.edgewall.org/wiki/Download
Best match: Genshi 0.5.1
Downloading http://ftp.edgewall.com/pub/genshi/Genshi-0.5.1-py2.5-linux-i686.egg
Processing Genshi-0.5.1-py2.5-linux-i686.egg
Moving Genshi-0.5.1-py2.5-linux-i686.egg to /usr/lib/python2.5/site-packages
Adding Genshi 0.5.1 to easy-install.pth file
 
Installed /usr/lib/python2.5/site-packages/Genshi-0.5.1-py2.5-linux-i686.egg
Finished processing dependencies for trac


…. Continue reading → Installing Trac on CentOS 5 »»

Useful Trac Plugins

Currently Installed
Installation steps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# NOTE: the order matters!
easy_install http://trac-hacks.org/svn/accountmanagerplugin/trunk
easy_install http://trac-hacks.org/svn/tagsplugin/tags/0.6/
easy_install http://trac-hacks.org/svn/stractisticsplugin/0.10/tags/0.4.2
easy_install http://trac-hacks.org/svn/projectmenuplugin/
# NOTE: APPLY PATCH: http://trac-hacks.org/ticket/1892
 
easy_install http://trac-hacks.org/svn/iniadminplugin/0.11/
easy_install http://trac-hacks.org/svn/ganttchartplugin/0.11/
easy_install http://trac-hacks.org/svn/gitplugin/0.11/
easy_install http://trac-hacks.org/svn/masterticketsplugin/0.11/
easy_install http://trac-hacks.org/svn/loomingcloudsplugin/0.11/
easy_install http://trac-hacks.org/svn/workfloweditorplugin/0.11/
easy_install http://trac-hacks.org/svn/tractickettemplateplugin/0.11/
easy_install http://trac-hacks.org/svn/tracticketstatsplugin/0.11/
 
# NOTE: Prior to installing graphvizplugin
yum install graphviz and graphviz-python
easy_install http://trac-hacks.org/svn/graphvizplugin/0.11-0.7.4/
easy_install http://trac-hacks.org/svn/tracticketdepgraphplugin/0.11/
 
easy_install http://trac-hacks.org/svn/tocmacro/0.11
easy_install http://trac-hacks.org/svn/ticketmodifiedfilesplugin
easy_install http://trac-hacks.org/svn/tasklistplugin/
Might be useful (someday)

Useful easy_install reference

Installing Trac Plugins Using Python’s easy_install (aka. as .egg files)

Recently I was trying to install some Trac plugins from the trac-hacks.org website. I have several instances of Trac and so I wanted to install the plugins as Python .egg files at a global level so that all the instances could make use of them.

First attempt …

It seemed easy enough, just use Python’s easy_install command and point it at the subversion tree for a particular Trac plugin.

1
2
3
% easy_install http://trac-hacks.org/svn/tagsplugin/tags/0.6/
Downloading http://trac-hacks.org/svn/tagsplugin/tags/0.6/
error: Unexpected HTML page found at http://trac-hacks.org/svn/tagsplugin/tags/0.6/

HMM… Googling a bit I came across a couple of posts which basically led to 2 possible solutions. One mentioned that you might have some success by appending a ?format=raw after the Trac Browser’s URL. The second mentioned trying to upgrade setuptools (aka. the package that provides easy_install).

I went with the second choice since I was dealing with a subversion repo directly and not the Trac Code Browser.

Second attempt …
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
% easy_install -U setuptools
Searching for setuptools
Reading http://cheeseshop.python.org/pypi/setuptools/
Reading http://pypi.python.org/pypi/setuptools
Reading http://cheeseshop.python.org/pypi/setuptools/0.6c9
Best match: setuptools 0.6c9
Downloading http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c9-py2.4.egg#md5=260a2be2e5388d66bdaee06abec6342a
Processing setuptools-0.6c9-py2.4.egg
creating /usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg
Extracting setuptools-0.6c9-py2.4.egg to /usr/lib/python2.4/site-packages
Removing setuptools 0.6c5 from easy-install.pth file
Adding setuptools 0.6c9 to easy-install.pth file
Installing easy_install script to /usr/bin
Installing easy_install-2.4 script to /usr/bin
 
Installed /usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg
Processing dependencies for setuptools


…. Continue reading → Installing Trac Plugins Using Python’s easy_install (aka. as .egg files) »»