Rails developers fortunate enough to run OSX have raved to no end about TextMate, but what do the rest of us, being *Nix and Windows users, have available? RadRails is an EXCELLENT IDE, and I have used it almost exclusively for nearly a year now, but as an editor, like all software, it has severe limitations. It's a bit slow and too much of a memory hog for my taste, and not nearly as easy to extend as I would like.
In my experience as a Linux administrator and desktop user, I have learned to appreciate, and now love the Vi editor. Well, more accurately Vim. If you are using a GUI, Cream is an excellent set of customizations for GVim that make Vim more accessible to the new user.
To improve the state of affairs even further, there are various Ruby and Rails specific extensions and customizations that bring Vim to the point of being nearly as good, and better in some ways, than TextMate or RadRails. We're talking autocompletion, autoindention, syntax highlighting, abbreviations, and much much more. See this post (so useful to me that I mirrored it here) for how to tweak Vim for Rails development.
Wednesday, January 03, 2007
Saturday, December 30, 2006
Ugly fonts in GTK 1.2 Apps
In Ubuntu (and perhaps other distributions), the menus in GTK apps may have a huge, ugly, and nearly unreadable font.

To somewhat fix this, edit /etc/gtk/gtkrc.utf-8 and change the fontset definition.
This will fix the menus, at least.

To somewhat fix this, edit /etc/gtk/gtkrc.utf-8 and change the fontset definition.
style "default-text-better" {
fontset = "-bitstream-charter-medium-r-normal-*-*-100-*-*-p-*-iso8859-1,\
--bitstream-charter-medium-r-normal-*-*-100-*-*-p-*-iso8859-1"
}
class "GtkWidget" style "default-text-better"
This will fix the menus, at least.
Friday, December 29, 2006
Blogger Out of Beta
At long last, labels! Now posts can actually be categorized! The blog layout designer is very nice as well.
The suite of applications now offered by Google is amazing. They are all well written, simple, and user friendly. I have only two more wishes. The ability to back up account data, and public key encryption for GMail.
The suite of applications now offered by Google is amazing. They are all well written, simple, and user friendly. I have only two more wishes. The ability to back up account data, and public key encryption for GMail.
Friday, December 01, 2006
RubyGems Error
If you get this error when trying to install a gem:
/usr/local/lib/ruby/1.8/yaml.rb:133: [BUG] Segmentation fault
Run "gem environment" to find the "gem path" (i.e. /usr/local/lib/ruby/gems/1.8 ) and delete the "source_cache" file located in that directory.
/usr/local/lib/ruby/1.8/yaml.rb:133: [BUG] Segmentation fault
Run "gem environment" to find the "gem path" (i.e. /usr/local/lib/ruby/gems/1.8 ) and delete the "source_cache" file located in that directory.
Monday, November 13, 2006
Tuesday, November 07, 2006
Election Day
This is perhaps the most important day in recent memory. The results of today's election will affect the course of this nation and by proxy the world. Actually...one can only hope.
It is unfortunate that an opaque and untrustworthy voting system negates the democracy of the process. There are reports from Texas and Florida (go figure) about electronic voting systems switching Democratic votes to Republican. That's one hell of a bug, especially one-way. Not to mention that exit polling is not being done in many areas.
They say never to attribute malice to incompetence or stupidity...but yet again, cynicism colors my perception. I think it quite unlikely that the Democrats will win overall this election. Not that I particularly like the Democratic party, but the Republican party has done more to destroy the liberty of the American people than any of the enemies it has sworn to protect us from.
It is unfortunate that an opaque and untrustworthy voting system negates the democracy of the process. There are reports from Texas and Florida (go figure) about electronic voting systems switching Democratic votes to Republican. That's one hell of a bug, especially one-way. Not to mention that exit polling is not being done in many areas.
They say never to attribute malice to incompetence or stupidity...but yet again, cynicism colors my perception. I think it quite unlikely that the Democrats will win overall this election. Not that I particularly like the Democratic party, but the Republican party has done more to destroy the liberty of the American people than any of the enemies it has sworn to protect us from.
Monday, November 06, 2006
PHPMyAdmin Authentication Error
Error: PHPMyAdmin - Client does not support authentication protocol requested by server; consider upgrading MySQL client.
Explanation: The user's password is stored on the server in the new password format.
Solution: In the server MySQL console: set password for user@host = OLD_PASSWORD('the_password');
Explanation: The user's password is stored on the server in the new password format.
Solution: In the server MySQL console: set password for user@host = OLD_PASSWORD('the_password');
Sunday, November 05, 2006
Fedora Core 6
I decided to give Fedora Core 6 a go since I had to reinstall Linux anyway.
My First Thoughts:
My First Thoughts:
- Installation isn't too bad...much better than the slow Ubuntu LiveCD
- I've got a lot of tweaking to do.
- These icons are HORRID!
- Where are my Nautilus bookmarks??? Where is the side panel???
Friday, November 03, 2006
Hard Lessons Learned...again
So yeah...I was trying to set up a VMWare virtual machine, and no matter what OS I tried to install, I would get errors. I poked around and noticed that a file in my /tmp directory was eating up ALL my disk space. A file with no owner...
Well, I can't delete it, so I go to single user mode...and still can't delete it. Oh joy!
Time to bust out the trusty Knoppix boot DVD. I run reiserfsck and find errors. Big surprise there. I run it again to fix and proceed to corrupt the partition even more. (Oh, by the way, this is my / partition, which is separate from my /home partition, thank god!!!). Of course the on-screen instructions DONT TELL YOU to --scan-whole-partition when you run reiserfsck --rebuild-tree ( it should be reiserfsck --scan-whole-partition --rebuild-tree /dev/hda1). So I proceeded to fubar my root partition beyond all recognition. Guess who didn't make backups???
I managed to clear space off my trusty 40GB IBM SCSI HD, and try to install Ubuntu Edgy Eft. 6 attempts later...I give up (due to some horrific installer bugs) and try Dapper Drake. I don't know what the hell is wrong with my box...but only the Xubuntu 6.06 installer worked. All the other installers hung at some point. Hey, maybe my RAM is bad. I'll start Memcheck before going to bed.
But anyway...my rant is coming to a close. Lesson learned...BACK UP YOUR SHIT. I had tweaked this box for almost 2 years running (thank you Debian/Ubuntu for in-place distro updates!) and I lost a LOT of config files...not to mention weeks of work logs, journal entries, and wiki entries stored in my /var/www folder.
Today sucked.
UPDATE: It was bad RAM.
Well, I can't delete it, so I go to single user mode...and still can't delete it. Oh joy!
Time to bust out the trusty Knoppix boot DVD. I run reiserfsck and find errors. Big surprise there. I run it again to fix and proceed to corrupt the partition even more. (Oh, by the way, this is my / partition, which is separate from my /home partition, thank god!!!). Of course the on-screen instructions DONT TELL YOU to --scan-whole-partition when you run reiserfsck --rebuild-tree ( it should be reiserfsck --scan-whole-partition --rebuild-tree /dev/hda1). So I proceeded to fubar my root partition beyond all recognition. Guess who didn't make backups???
I managed to clear space off my trusty 40GB IBM SCSI HD, and try to install Ubuntu Edgy Eft. 6 attempts later...I give up (due to some horrific installer bugs) and try Dapper Drake. I don't know what the hell is wrong with my box...but only the Xubuntu 6.06 installer worked. All the other installers hung at some point. Hey, maybe my RAM is bad. I'll start Memcheck before going to bed.
But anyway...my rant is coming to a close. Lesson learned...BACK UP YOUR SHIT. I had tweaked this box for almost 2 years running (thank you Debian/Ubuntu for in-place distro updates!) and I lost a LOT of config files...not to mention weeks of work logs, journal entries, and wiki entries stored in my /var/www folder.
Today sucked.
UPDATE: It was bad RAM.
Sunday, October 29, 2006
The Joke of Airline Security
From Wired:
My point here is that the government really doesn't care about security. A state of fear is to be instilled in the populace, and limited token steps are taken to give the impression of security. Not only does this create a cycle of dependence on the powers that be for security, it is a slow path to the elimination of freedoms of the public and empowerment of the establishment.
Maybe I am just a cynic and see pretense and dissimulation in the place of stupidity, shortsightedness, and incompetence.
Security researcher Christopher Soghoian created the Northwest Airline Boarding Pass Generator in the hope of spurring Congress to look closely at the nation's aviation security policies, which he calls "security theater."A warrant was submitted, and the Feds broke down his door taking computers, etc. I guess it is a crime to point out that the emperor has no clothes. This "fake boarding pass generator" had nothing to do with computer security. Any 6 year old that can type on a keyboard could edit the HTML of an internet issued "boarding pass" and reprint it.The site lets anyone create a facsimile of a Northwest Airlines boarding pass, with whatever name they choose.
On Friday, Congress heard Soghoian's message loud and clear. But instead of promising to reform broken airport security procedures, Rep. Edward Markey (D- Massachusetts), a member of the House Homeland Security committee known for his defenses of privacy, wants the site shut down and Soghoian arrested.
My point here is that the government really doesn't care about security. A state of fear is to be instilled in the populace, and limited token steps are taken to give the impression of security. Not only does this create a cycle of dependence on the powers that be for security, it is a slow path to the elimination of freedoms of the public and empowerment of the establishment.
Maybe I am just a cynic and see pretense and dissimulation in the place of stupidity, shortsightedness, and incompetence.
Saturday, October 28, 2006
Merchanthound.com
The Merchant Hound site is coming along quite nicely. Fun Ajax action, and very aggressive caching make for a fast enjoyable experience. I'd use the site myself if I bought anything online anymore. I am still working out some of the kinks in the page and database cache, so performance can be spotty at times, especially when I am committing changes for the day.
I fixed the XML product feeds today. They look beautiful on the Google feed reader.
I fixed the XML product feeds today. They look beautiful on the Google feed reader.
Friday, October 27, 2006
Installing Java, the Ubuntu Way
sudo apt-get install fakeroot java-package java-common
fakeroot make-jpkg --full-name "My Name" --email "me@example.com"
sudo dpkg -i sun-j2re1.5_1.5.0+update05_i386.deb
sudo update-alternatives --config java
Italian Sausage Soup
Ingredients
- 2lb. italian sausage
- 1 onion sliced
- 2 cans stewed tomatoes
- 1 12oz can tomato sauce
- 3 raw potatoes julienne sliced
- 1 bag frozen vegetables (asian blend)
- 1 tsp. basil
- 3 tbs. parsley
- 1/4 tsp. oregano
- 1 tsp. onion salt
- 1 tsp. sugar
- 3 bay leaves
Directions
- Brown meat
- Combine ingredients in large pot
- Add water to 1 1/2 in. of top of pot.
- Bring to boil.
- Simmer covered for 45 min. to 1 hr.
Serves …a lot of food
Quotes
To announce that there must be no criticism of the president, or that we are to stand by the president right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public.
-Theodore Roosevelt
If Tyranny and Oppression come to this land, it will be in the guise of fighting a foreign enemy.
-James Madison
Thursday, October 26, 2006
Late Night Rambling
There is far too much information, and far too many ways of storing it. I have a local blog and wiki, for sake of data ownership, but I would like to push data to the wider net as well to give back.
Everything I could possibly care to know and more is available due to the work of others, and it is a small effort to return the favor.
Everything I could possibly care to know and more is available due to the work of others, and it is a small effort to return the favor.
Cannot Install any Ruby Gems
Problem: Error trying to install ANY gem.
Error Message:
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find rubyzip (> 0) in the repository
Solution: Delete source_cache file (run gem environment to find the Gems install location)
Error Message:
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find rubyzip (> 0) in the repository
Solution: Delete source_cache file (run gem environment to find the Gems install location)
Rails Setup With Mongrel and Apache mod_proxy
I set up Apache to proxy requests to the 3 Mongrel servers providing blogging, wiki, and todo list functionality.
This setup is for local access only.
- Create mongrel system group and user
- Place Rails applications in /var/www/mongrel
chown -R mongrel:mongrel /var/www/mongrel- Create mongrel initscript:
/etc/init.d/mongreland symlink to/etc/rc2.d/S99mongrel
#!/bin/bash
case $1 in
start)
port="12000"
for appdir in `ls /var/www/mongrel`; do cd /var/www/mongrel/$appdir ; echo " * Starting $appdir on port $port."
mongrel_rails start -d -e production -p $port --user mongrel --group mongrel -a 127.0.0.1 ; port=`echo "$port + 1" | bc`
done
;;
stop)
for appdir in `ls /var/www/mongrel`; do cd /var/www/mongrel/$appdir ; echo -n " * Stopping $appdir..."
mongrel_rails stop ; done
;;
restart)
for appdir in `ls /var/www/mongrel`; do cd /var/www/mongrel/$appdir ; echo -n " * Restarting $appdir..."
mongrel_rails restart ; done
;;
esac- Start mongrel service and test
- Add entries for
127.0.0.3 blog.localhost,127.0.0.4 wiki.localhost, etc. to/etc/hosts - Enable mod_proxy (
sudo a2enmod proxy) - Allow local proxy requests by modifying the
/etc/apache2/mods-enabled/proxy.conf(Allow 127.0.0.0/255.255.255.0) - Add
Listen 127.0.0.3:80, etc. to /etc/apache2/ports.conf - Create VirtualHosts entries for the servers in a new
sites-enabledfile (I usedproxy)
NameVirtualHost wiki.localhost:80
<VirtualHost wiki.localhost:80>
<Directory "/">
Order allow,deny
Allow from all
</Directory>
ProxyPass / http://localhost:12000/
</VirtualHost>- Restart Apache
Wednesday, December 28, 2005
Ruby on Rails
...but still here.
My latest interest is Ruby on Rails. From a complete Ruby on Rails n00b to a custom, from scratch, multiple bank account balancing web app in less than 9 hours. Yeah, thats 9 hours INCLUDING reading, learning, debugging, etc. WOW!
The framework seems to be worth the hype.
My latest interest is Ruby on Rails. From a complete Ruby on Rails n00b to a custom, from scratch, multiple bank account balancing web app in less than 9 hours. Yeah, thats 9 hours INCLUDING reading, learning, debugging, etc. WOW!
The framework seems to be worth the hype.
Sunday, October 16, 2005
VNC Server Setup on Ubuntu 4.10
VNC Server Setup on Ubuntu 4.10
=====================================
$ sudo vi /etc/apt/sources.lst
# uncomment the unverse repository
$ sudo apt-get update && apt-get install vnc4server
$ sudo vi /etc/X11/Xwrapper.config
# change
allowed_users=console
to
allowed_users=anybody
$ sudo vi /etc/vnc.conf
# change
$XFConfigPath = "/etc/X11/XF86Config"
to
$XFConfigPath = "/etc/X11/xorg.conf"
$ echo "gnome-session &" > vi ~/.vnc/xstartup
$ vncpasswd
# set password here
$ vncserver -geometry 1024x768 -depth 24 :1
$ vncserver -kill :1
# to kill vnc
=====================================
$ sudo vi /etc/apt/sources.lst
# uncomment the unverse repository
$ sudo apt-get update && apt-get install vnc4server
$ sudo vi /etc/X11/Xwrapper.config
# change
allowed_users=console
to
allowed_users=anybody
$ sudo vi /etc/vnc.conf
# change
$XFConfigPath = "/etc/X11/XF86Config"
to
$XFConfigPath = "/etc/X11/xorg.conf"
$ echo "gnome-session &" > vi ~/.vnc/xstartup
$ vncpasswd
# set password here
$ vncserver -geometry 1024x768 -depth 24 :1
$ vncserver -kill :1
# to kill vnc
Subscribe to:
Posts (Atom)