oscartheduckin’ around

November 6, 2008

Installing rails 2.02 on ubuntu Intrepid with ruby 1.8.6

Filed under: how to, ruby, ubuntu — oscartheduck @ 5:26 pm

I’ve done this too many times to have not documented it somewhere.

Ruby 1.8.7 is the default on Intrepid; 1.8.6 is needed to run rails < 2.1, so it’s useful to know how to do it.

1. Install ruby from source.


2. install rubygems from source


3. You’ll get the following error:

in `gem_original_require’: no such file to load — zlib (LoadError)

if you try to use rubygems.

To solve this, go into your ruby source directory:

cd ruby-1.8.6/


cd ext/zlib

ruby extconf.rb


sudo make install

4. sudo gem install rails -v 2.0.2


July 27, 2007


Filed under: ubuntu — oscartheduck @ 2:57 am

For laptops, hands down the only *nix I really consider installing is Ubuntu. Because they always have those weird weird keys for things like volume controls that I never know what to do with on something that I’m compiling myself. In the past few days, though, I’ve installed Ubuntu on two laptops, one less than a year old, and it has solved my issues nicely.

The only complaint I have is that in spite of claiming to have a driver to work my wireless card on the newer laptop it still needs to be manually configured. It *sees* my wireless network, but won’t get an address. This is unlike the ridiculously good FreeBSD, which configured perfectly a card that no linux would even see (and from the rather popular linksys brand, too).

Ubuntu is blingtastic as ever. And its package managment abilities are still reasonably good — the reason I installed it on this laptop, in fact, was because the other laptop I installed it on introduced me toa linux game that was amazingly amazing. I forget the name, but it was similar in feel to Dune2 on the Amiga.

And because I can’t fucking beat GNU chess. Sure I can install that on FreeBSD, but I didn’t want to hose my windows install (again). I’m required to use Adobe Photoshop for one of my jobs, and a few other windows specific packages like MS Office 2007. I don’t *like* using them, and I’m damn good with the GIMP and would LOVE to see an MS Office 2007 compatible plugin on OpenOffice so I could stop booting up into
windows again, but there we go.

So how did installing Linux not hose the install? I used this project I discovered a long time ago in its infancy called Wubi. It’s one of those things I bookmarked in my head and checked in with every month or two because it was so fucking promising. And it has turned out great.

Instead of partitioning your hard drive, Wubi takes a small performance hit by simply setting up a massive file on your Windows box and installing to that file. Presumably it uses NTFS capture or something to ensure that it doesn’t corrupt your drive.  The result, though, is a danger free install of Ubuntu. I gave it ten gigs, figuring that I haven’t ever really gotten close to that without using Virtual Machines, and I’ll just use my windows VMware install to support those.

As far as speed goes, there is a somewhat noticeable lag for things starting up. Firefox took about four seconds to start, which is on a dual core machine with a couple of gigs of RAM and a video card with a quarter gig of RAM. This thing should start firefox almost instantly and, indeed, on a dual core machine with FreeBSD on there, tuned a little, clicking on almost any application is about as responsive as can be.

The slow application startup time, though, is really only for large binaries, which is to be expected given the weird way the file system is having to behave.

My laptop volume buttons are properly configured as is, to my surprise, the scroll bar on my touchpad.  I never ever thought any linux would configure that out of the box, but there we are.

Next, I should see if Beryl will work. Oh hell yes.

May 1, 2007

Why do I use Free/Open BSD?

Filed under: edgy eft, freebsd, openbsd, Personal, ubuntu, vmware — oscartheduck @ 2:30 am

I was sitting around and thinking, when it hit me that though I’m writing reasonably techie unix blog entries here, I haven’t covered why it is that I’m not writing a linux blog. Why did I become one of those snobbby BSD bastards?

The tale starts with a friend of mine. I was a SuSE user, back when it was SuSE not SUSE. And I was trying to install gaim from an .rpm package. And, lo, it was frustrating as hell. See, rpm is designed for people who like to insert their own eyeballs rectally; it’s painful to deal with. My friend says to me “Ah, but in FreeBSD all you’d have to do is pkg_add -r gaim and it’d all be solved for you.”

Now, I figured this was a magical sounding deal, so I promptly didn’t use FreeBSD. See, I knew the installer would be hard, and didn’t want to deal with it.

Instead, I installed libranet, a now defunct distro. Except that I got into linux when we were calling them flavours, so I think of it as a defunct flavour. I’d been using SuSE for about two or three years at this point, and though the default package install was all fine and it ran well, I still felt a stabbing pain in my chest when it came to installing from a downloaded .rpm file. And that isn’t good. I’d heard about debian (woody at the time) being a pain in the fucking ass to install, but simple to maintain, so I searched for something like “simple debian install” and discovered libranet. And it worked wonderfully.

The main issue with libranet was the proprietary systems managment tool, adminmenu. Updating from woody to sarge meant that adminmenu in the free version of libranet broke. There were two ways to fix it, either downgrade to woody or buy the newest version of libranet. This meant I was in crisis, because I didn’t want to do either of those, so I basically stopped using linux for a while.

I knew that I wanted to run linux, though, so I reinstalled SuSE. From the same old CDs. Ouch.

As soon as I started running into the same issues, I figured fuck it, I don’t need linux this badly.

I started a computer job not too long after that and got into virtual machines. I installed ubuntu, and was surprised at how lovely it was. I started using debian based distributions at work in VMs and at home in VMs, but didn’t do an install. I used enough that I got to figuring I liked Ubuntu best of all of them, so I stuck with that.

Eventually, I got tired of how hand-holdy ubuntu can be and started wondering about using other things. So I looked around, and my old friend was right there with me saying I should think about FreeBSD again. So I went home, installed it on my old P3 machine with 128MB RAM and noticed a couple of things. First, I didn’t have a gui by default, which I liked. I never use the gui on ubuntu, it just sits there looking pretty while I move around xterms. Second, it blistered. I mean, really was fucking fast.

I got to running this and that and intalled FreeBSD in virtual machines and started looking at OpenBSD too. I would like to go down categorically as saying that I really love using OpenBSD. It’s not as blistering as FreeBSD, but it makes the business of administering a server simple as hell. Install, it’s secure. Nothing else to do to make it secure, just keep up with patches.

The two BSDs were so… clean. Want something to start with a reboot? Add it to /etc/rc.conf or /etc/rc.conf.local depending on which of the two you’re running. Want to install something? pkg_add -r filename.

But let’s say you’ve got a slow computer, let’s say a P3. So you don’t want programs to be not-compiled for your platform, because you want every speed optimisation possible. There’s an automatic system for compiling from source code in BSD. Install the ports archive, which is a simple thing to do and is probably done on install for you, and then cd /usr/ports/packagename && make install clean and it’s done for you. It downloads the source code, compiles it and installs it.

That’s a gorgeous thing. A very gorgeous thing.

So, anyway, I saw these features and thought they were nice. And the more I was using the BSDs, the more I felt like they were doing unix in a way that made sense to me.

This is really illustrated if you ever try to install apache on FreeBSD, OpenBSD (where it’s preinstalled!) and debian. Debian is fucking horrible for an apache install.

So that’s why, I guess. BSD makes sense to me as a system. After several years of not very good linux experiences, but thinking that the flat file system concept with text files for everything was awesome, I discovered something that did it cleanly. And these days using linux feels sludgy and slow and not as well put together.

Which is not to say it’s without merits; of course it has a lot going for it. The init system for starting processes is interesting, but I think BSD does it better than system V. The linux advances on system V were very interesting in this area, though. But BSD is better 😉

February 12, 2007

moinmoin on edgy eft

Filed under: edgy eft, MoinMoin, tech, ubuntu — oscartheduck @ 4:22 am

28.1.07 – Happy new year. I recently had cause to set up moinmoin on ubuntu 6.10, and figured I’d give you the blow by blow. Because it’s not as simple as I’d like it to be, in spite of the excellent documentation on moinmoin’s website.

First, get the base packages. You’re looking at a simple “sudo apt-get install moinmoin-common”. No problems there, then.

Now, moinmoin is python based, which is good because if it wasn’t then there’s no way on this fucking planet that I would’ve managed the install properly. See, there’re a few things along the way that get mangled between apt-getting and attempting to follow the moinmoin documentation.

So, now grab the moinmoin official packages. I know, I know, you just apt-getted the binaries, but this actually seems like a necessary step. See, moinmoin wants to have a bunch of special MoinMoin scripts installed as python packages, and this is the easiest way to get there.

Once you’ve grabbed the official packages, gunzip and untar ’em to your desktop.

Locate setup.py and run it as described here. It adds all the packages to your python setup (python 2.4 is included as default on Ubuntu, I think). Remember to sudo the install command.

Now, test whether or not that worked properly. At the command line type “python”. THe prompt will change. Now type “import MoinMoin”. It should just work with no weird errors at all, you just get the >>> prompt again. Hit ctrl-D to leave python.

So great, you’ve got the install done. Next is to alter permissions and tweak some files to get YOUR wiki instance running rather than the default. You’ll appreciate the use of python as the base language here.

First, altering permissions. This is important as it changes how public your wiki is. I wanted one that only one group on my linux box could alter, everyone else was to be locked out. So, first thing I did was create a new user account to be the wiki admin. You can do this through gnome’s gui tool very easily, just use that for now.

I called my new user moinmoin and added a new group for that user called moinmoin, and my following examples assume that you do the same thing.

Now that you have the group and user IDs set up, cd into the moinmoin directory that you have; it’s /usr/share/moin. Now there are a few ways to change the group recursively. Easiest way is probably chgrp -R. So run this command:

sudo chgrp -R moinmoin ./

Now if you do an ls -l you should see that your moinmoin group (whatever it is) owns all the files and folders and whatnot.

Now do this:

sudo chmod -R 770 ./


This makes it so the owner, root, can edit everything, and anyone in the moinmoin group can edit everything, but the rest of the world can’t. It’s good security, unless you want to go the traditional wiki route of allowing ANYONE to edit ANYTHING in which case 777 is a good way to go.

Now, creating the wiki instance. The moinmoin documentation here is very good, so click here and follow it. If you make your wiki instance as the moinmoin user, it’ll have the correct group owner automagically.

If you make a mistake here, it’s most likely duplicating some directory names. My wiki is called SeventhSon, and when I checked their instructions I had a /usr/share/moin/SeventhSon/SeventhSon/[all the data], so I copied the data into the higher Seventh Son and deleted the other one.

Almost everything is done.

This is linux, based on unix. As such, when you want to offer a service it runs as a constant process; think about ssh. If you want ssh to run, you set up the sshd script to run. There’s a moinmoin script that needs to run in order to offer this service. Weirdly enough, I didn’t notice this being mentioned anywhere on moinmoin’s documentation, I found it mentioned here.

You may as well copy it into your wiki’s directory, for convenience. It’ll be in /usr/share/moin/server/, and it’s called moin.py You can run it from wherever you see it, though.


Almost there. If you run moin.py by entering from the wiki directory ./moin.py. You get instructions about how to access your wiki – open a browser and enter localhost:8000 as the URL to visit.

You should get an error, telling you something like:

“/org/mywiki/data doesn’t exist.”


I managed to luck upon the way to fix this.

sudo vi /etc/moin/mywiki.py and change the data directory listed in the last line to /usr/share/moin/[yourwikiname].


Blog at WordPress.com.