phup 'n stuff

Another Blog About Being a Developer

Posts Tagged ‘Linux’

An Epic Struggle With Portage

Tuesday, February 23rd, 2010

Today I embarked on an epic struggle with the Portage package manager attempting to update the packages on my system. After I ran into what can only be described as a phantom package.

(more…)

Removing Windows Newline Characters in Vim

Monday, December 21st, 2009

Sometimes when working on projects in both Linux and Windows, a file will end up with Windows newline characters, which show up as ^M in Vim. Annoying as this is, there's a quick fix to remove them in Vim using a regular expression replace:

:%s/<control-v><control-m>//g

Magically, all the ugly Windows newline characters are gone.

A Complete, Polished Look for Gnome

Thursday, September 17th, 2009

I'm not afraid to admit it: I'm a fan of Gnome. I think KDE looks to cartoonish. I actually prefer using OpenBox with a slew of lightweight apps for window manager addons, but that because too much to maintain, and I have better things to do with my time.

It's hard to find a nice, clean set of decorations for Gnome that mesh well together. GDM theme, icons, wallpapers, GTK themes, etc that all blend well together to create a complete, polished look.

Recently I found the "Colors" theme set on Gnome Look.

GDM and Wallpapers: http://www.gnome-look.org/content/show.php/Arc-Colors+GDM-Walls?content=88305
GTK: http://www.gnome-look.org/content/show.php/Shiki-Colors?content=86717
Icons: http://www.gnome-look.org/content/show.php/GNOME-colors?content=82562

Nice and simple.

Failed Kernel Upgrade

Saturday, March 21st, 2009

The other day I upgraded my Gentoo kernel (after realizing I was about 7 kernel updates old). After compiling and setting up Grub, I rebooted and received this error:

RAMDISK: Compressed image found at block 0
RAMDISK: ran out of compressed data
invalid compressed format (err=1)
UDF-fs: No VRS found
List of all partitions:

No file system could mount root, tried: …
Kernel panic - not syncing: VFS: unable to mount root fs on unknown-block(1,0)

After painful research, I finally discovered the problem: I ran out of space on my boot partition.

Apparently genkernel does not complain when it runs out of space to compile the kernel. It just stops and outputs the same message it would it if succeeded.

A "quick" use of parted to allocate more space to the boot partition, and re-compiling the kernel solved the problem. It's just sad that genkernel doesn't bother reporting the fact that it ran out of space.

Windows -> Linux Path Problems

Sunday, October 22nd, 2006

I had one hell of a time when I copied my Ruby on Rails application from my development machine (Windows XP, Apache 2.2) to my production machine (Linux, Apache 1.3). I floundered through a series of errors and problems, but one error really stumped me, and unfortunately I couldn't find much help on the net for it:

Application error (Rails)

It took me forever to get past this problem, but I finally figured it out. The first line of a few files in the public/ folder contained a path to the Ruby binaries.

#!C:/ruby/bin

For obvious reasons, this wasn't going to fly well on a *nix server. So I had to change it in the following files: dispatch.cgi, dispatch.fcgi, dispatch.rb.

In my instance, it was changed to:

#!/usr/local/bin/ruby

But obviously your server might be different. Try exploring /usr/local and /usr/bin or using locate ruby to try to find the correct path to Ruby.

After I made this modification the application worked fine.