Posts Tagged ‘RedCar’

RedCar Text Editor on Fedora Core 10 (FC10) and Fedora Core 11 (FC11)

Thursday, June 25th, 2009

I use a lot of vi in writing ruby code. I’ve seen TextMate and wondered if such a beast exists for Linux… well, it does. It’s in the form of a ruby project called RedCar. I started down the path of installing it but couldn’t find instructions for Fedora and was running into problems getting the debian/ubuntu instructions to fly. That’s why this is here. If I ever have to do this again I’ll be glad I put these instructions here. I’ve done what I can to get this up and running in a clear way but your mileage may vary (YMMV).

Post back with comments and improvements.

Get the basic install packages:

On FC10 (32bit)

sudo yum install git-all ruby-gconf2 ruby-gnome2 oniguruma oniguruma-devel gtk2 gtk2-devel glib2 glib2-devel libgee libgee-devel ruby-gtksourceview2 gtksourceview2 gtksourceview2-devel xulrunner xulrunner-devel xorg-x11-server-Xvfb dbus-devel WebKit-gtk-devel WebKit-gtk WebKit-doc ruby-gtk2 ruby-gtk2-devel

On FC10 (64bit)

sudo yum install git-all ruby-gconf2 ruby-gnome2 oniguruma.i386 oniguruma.x86_64 oniguruma-devel.i386 oniguruma-devel.x86_64 gtk2 gtk2-devel glib2 glib2-devel libgee.i386 libgee.x86_64 libgee-devel.i386 libgee-devel.x86_64 ruby-gtksourceview2 gtksourceview2 gtksourceview2-devel xulrunner xulrunner-devel xorg-x11-server-Xvfb dbus-devel WebKit-gtk-devel WebKit-gtk WebKit-doc ruby-gtk2 ruby-gtk2-devel

On FC11 the process has only the exception that WebKit-gtk is now referred to as webkitgtk:

sudo yum install webkitgtk-devel webkitgtk webkitgtk-doc

Get missing development headers (not just for x64 systems):

wget redcareditor.com/stuff/missing_x64_headers/rbgdkconversions.h
wget redcareditor.com/stuff/missing_x64_headers/rbgtkconversions.h

Determine your platform if you don’t alread know

uname -p
i686 == 32 bit
x86_64 == 64 bit

32 bit do:

sudo cp rbgtkconversions.h rbgdkconversions.h /usr/lib/ruby/1.8/i386-linux/

64 bit do:

sudo cp sudo cp /usr/lib64/ruby/1.8/x86_64-linux/ rbgdkconversions.h /usr/lib64/ruby/1.8/x86_64-linux/

I use github often and so have it setup as a gem source:

sudo gem source -a http://gems.github.com

Install needed gems:

sudo gem install oniguruma activesupport rspec cucumber hoe open4 zerenity statemachine

Go to your development directory and:

git clone git://github.com/danlucraft/redcar.git

Change to the redcar directory:

cd redcar

Ensure you are using the “stable” branch:

git checkout stable

Get the redcar submodules (like textmate bundles):

git submodule init
git submodule update

Install dbus gem.

I used sdague-ruby-dbus because the plain old ruby-dbus (dbus gem) would not build for me. YMMV:

sudo gem install sdague-ruby-dbus

It turns out that I could not get dbus to run (meaning that if I have RedCar running and attempt to load a file from the command line it opens as a separate instance instead of opening the file in the currently running RedCar instance. A minor hassle)

Build redcar

rake build

Make an alias script for redcar

This allows you to launch redcar from anywhere on the system

sudo vi /usr/local/bin/redcar
#!/bin/sh
# I use –multiple-instance because ruby-dbus just isn’t working for me.
/<YOUR REDCAR DIRECTORY>/bin/redcar –multiple-instance $1

Make the script executable:

sudo chmod a+x /usr/local/bin/redcar

Start redcar

/usr/local/bin/redcar README.md

The first time you run redcar it will take some time to collect all it’s library and bundle files. That’s a one time thing.

I use –multiple-instance because ruby-dbus just isn’t working for me. If you know how to make it hum please leave a comment and I’ll update the post.

Base configuration taken from: http://github.com/danlucraft/redcar/blob/eeebf739365d8bfd0e06ed001bd6b7960d76daa3/INSTALL.md