Ruby Gems Suck?
A few days ago, a friend asked me what I’d suggest they do to get a website up and running AND he was headed towards a big, complex CMS, Content Management System. He wants to maintain a few websites, but most of it would be static webpages that need the same look-and-feel.
I don’t have anything against CMSs, I’ve tried and deployed more than a few of them. But for someone new to hands-on web site development, that isn’t the way to go when you work alone. Static HTML is what you need to start. A good templating engine is the second step. There’s a ruby program called webgen that does this. So, I decide to install the newest webgen on a virtual machine.
I already have ruby and rubygems installed in the normal Ubuntu way. This should be quick …. NOT!
The instructions for installing webgen say the easy way is: `sudo gem install webgen` – I get dependency errors, so I run it again, and again, and again and again until they are resolved. Nice.
Go to the area that I’d like to create my website and run `webgen create MySite` – webgen not found. Huh? I’ve become spoiled with Ubuntu installations. Programs that get installed just work, like you’d expect. There’s no mention of manual configuration required in the webgen documentation page. I search and discover there’s a different version of gem installed that isn’t compatible with some other dependency – fine. I try `sudo gem update` to update all gems on the system. More dependency issues – so I run it 5+ more times until they are resolved.
`webgen` still doesn’t work. I read a little more – it’s been over 2 hours screwing around with this stuff now. I create a softlink to ~/bin/ for it – no go, but at least the program is found. I export GEM_HOME and RUBYLIB environment variables. No joy. I try matching exact dependencies for webgen – and there are over 15 of them. How much more is needed to get this program working?
I’ll never know – after 3 hours of trying to setup webgen, I give up. Someone will call me an idiot on the blog a few hours, that’s fine. Clearly, someone with my minimal development experience and completely lacking in computer skills isn’t fit to run a trivial ruby program.
Oh, BTW, this blog has been running on a Ruby on Rails system, Typo, for over a year and I’ve been a programmer for over 20 years. Yep, I must just be stupid that gems was able to prevent my use of webgen.
Result – Ruby Gems Sucks.
Computer Power Consumption
Most new IT efforts have a Green Component to them. At a minimum, the amount of power used is to be minimized for any new equipment. Other projects involve consolidating servers with a 4:1 or higher reduction. That reduction, when combined with fewer total number of CPUs, hence fewer licenses, more efficient storage architectures and significantly more efficient servers from a power consumption perspective really lowers the power usage overall.
As an example, a recent server review showed 14 servers. Our efforts so far had added 2 new highly efficient servers and removed 4 older servers. The two new servers deployed VMware and were using approximately 20% of the CPU and 50% of the RAM (generous RAM allocations to start) after migrating the 4 physical servers into virtual servers. We are targeting a peak CPU utilization of 60%-80%, so a few more virtual servers may be added to each system. That will reduce the total server count from 14 to 8 (14-4+2-4) with more manageable systems overall, easier disaster recovery, and significantly lower power consumption – perhaps 2/3rds less power.
One of the older, already retired systems used over 500VA of power just for server idle with nominal processing. The new servers at idle use approximately 80VA each. On average, the other servers used about 300VA of power, 3x more than the new servers.
The savings aren’t just in direct power use reductions. The UPS system has costs too. As the required power load is reduced, it is important to resize down the UPS system so battery charge maintenance and AC—> DC conversion loses are minimized. Required cooling is also reduced, which is important in warmer clients.
At my home, I’ve used a Kill-A-Watt to measure power use of my systems and a TV.
New Core2Duo system with 4GB RAM – Peak 126W, Nominal 80W, off 8W
3 Yr Old Core2Duo system with 2GB RAM – Peak 173W, Nominal 126W, off 0W
Toshiba 37" LCD – Peak 147W, Nominal 104W, off 0W
Clearly newer systems are more efficient than older systems. Similar performing nVidia graphics cards are in each server, both with 2 internal disks as well. A RAID card is installed in the older system, which could be the main power impact. Motherboards are different between each box, but other than age, believed to be comparable. Also, the older box has a high efficiency power supply – over 90% efficient with the newer server using a normal case power supply.
Solved - "prepare this blank disk" Vista error
Solved – no help needed.
Since purchasing a new laptop loaded with Vista, I’ve had a small issue. Every time I try to read a CDRom, a helpful window is desplayed, Prepare this blank disc and it provides options for a live file system. The Burn a Disc window title is unnerving too.
This would be wonderful, assuming the disc wasn’t already full.
I’ve searched and searched MS and google for a solution. None have worked so far. I’ve attempted hacking the registry. No joy.
The only non-standard thing that I’ve done is to make this drive letter Z: – it’s a system admin thing to know that Z: is always the CDROM/DVD player.
This is outside VirtualBox, at the host OS level.
Solution
So the answer was to place a file – any file – in to the C:\Users\{USERID}\AppData\Local\Microsoft\Windows\Burn\Burn directory. There was a “desktop.ini” file already there, but that was worthless for this issue.
Others have noted that enabling autorun would also correct this error, but that is simply stupid and Microsoft should know better.
This solutions isn’t 100% since there’s a nag bubble above the system tray reminding me that I have unburned files. Gee, that’s useful. Thanks again MS.
Solved - Skype Microphone not working
So we all use Skype for cheap international communications. You may use it for conference calls too. It isn’t a bad solution – for free.
For Linux clients, Skype hasn’t been updated to make it just work with the modern sound systems. I’ve had trouble getting the microphone to work – just like many many, many others.
Sound works perfectly – I can hear everyone else, but they can’t hear me. I hear myself through the speakers, but they can’t hear me.
The fix that worked for me – there seem to be many of these fixes -
- run skype as root, once
- use alsamixer and set the Mic input up. There doesn’t seem to be a Mute toggle in this text interface.
Use alsamixer, not any GUI (like kmix or xfce4-mixer):
– Go to the “Capture” View
– Front Mi – 100
– Mic Boos – 100
– Capture – 42 <— Required; different levels are not good
– Capture – 0
– Capture – 0
– Digital – 68 <—- Required; different levels are not good
– Input So – Mic
– Input So – Front Mi
– Input So – Mic
kmix and xfce4-mixer don’t seem to work. The settings above are for my system. Your settings may need to be different.
Solved - Ubuntu Right-Alt key doesn't work
For the last few years, every time after loading Ubuntu, I discover that my right
To fix this:
Comment out in the /etc/X11/xorg.conf:
Option “XkbOptions” “lv3:ralt_switch”
Restart your X server. Life is good.
This should be applicable to any Linux system running X/Windows. The “lv3:ralt_switch” is used to enter international characters as needed in Spanish accents, German umlauts, and other language characters. If you don’t use these characters outside a word processor, then this setting is bothersome.
FOSS Solutions with Asterisk
So, I was listening to a podcast about Asterisk today with the founder of Asterisk (an open source telephony system and PBX), Mark Spencer. Anyway, he was describing all the things that the community had added to the base code and all the extensions that were available.
About 50% of Asterisk code was created by the community. The rest by the Digium company according to
A few extensions were mentioned, the one that caught my attention was Booty Dialier. There’s a nice flowchart at the link. The premise is that towards an end of a night out, single people may want to find some overnight company. You preconfigure your list. Then on the night out, you call a number and login with voice/dtmf commands. The Asterisk server calls your list in turn asking them the fairly direct question. If they answer yes, you are connected. If no, they get a prerecorded message. This isn’t a new extension, it is just new to me.
There are a number of other voice/computer interface systems for Asterisk.
Solved - DVD and CDrom Optimal Filling
Over the years, I’ve burned a few backup optical media. As always, trying to get the “best fit” between the available files and media size is desired. There are programs that help fit the most files on a disk.
A list:
- FillCD
- gaffitter
- SizeMe
- Burn To The Brim
Most are Windows. An author suggested running his under Wine on Ubuntu. Er, not my preferred way. gaffitter will be tried first. I think I’ve used SizeMe before and it was impressive at optimal directory suggestions, but a “Move it” button would have been nice.
Updates as I try them out.
gaffitter rocks!
Here’s an alias to make this easy to use:
alias fitdvd='gaffitter -t 4482 -m --bs 2048'
or
alias fitdvd='gaffitter -t 4482m '
if you’re running a newer gaffitter like Ubuntu 10.04 includes.
will look at the input directories and output optimized file/folder lists to fit a DVD 4.7G. Fantastic. I take that output, shove it into a file and create a ‘mv’ script.
Personal Records Management
Many people still have credit card receipts from a dinner in 1985. Do you?
Personal records management is simple and need not be complex.
- Get a 3"-5" expandable simple 1-section filer.
- Write the year on the outside.
- Put most financial transaction paperwork (bills, receipts, bank statements) into the folder in the order they occur, approximately.
- Keep paystubs, brokerage account statements, and other critical data filed separate. Things that show start/end dates for insurance, residency/citizenship.
If you later need a receipt for a warranty, you probably know which year/folder it is in. It happens so infrequently, that searching through a folder isn’t too much trouble AND the filing isn’t too much trouble that you won’t do it. If you enter transactions into Quicken, you can search and find the purchase date – a good hint for which part of the folder the receipt is located.
If you pay your personal bills, there’s little reason to keep bill records beyond 7 years (in the USA). Tax returns too. The last loan payment statement for big items (car, home) with either a current balance or payoff is all that is needed beyond 7 years. I’ve needed a car payment “thank you for your business, paid in full” letter to fix incorrect credit service information. Having that letter easily available made it simpler.
For electronic transaction data, the same method applies, file by year. It makes annual clean up trivial. Anything more complex requires a REAL need to justify it and you won’t follow it unless it is part of job.
Email – same thing, file by year. That’s close enough that searching isn’t too big and will probably prevent the 2GB issue that Outlook has. For about a month in January, you’ll probably use both year folders/PST files (current and last year).
Simple, effective, easy to do records management is yours. The most important part is to delete/shred them later …
Media Center Garbage
So I’ve been happily using a TiVo for the last 6 years. For about 2 years before getting a TiVo, I attempted to build my own Media Center PC. I was a little too early in the cycle then.
TiVo records videos, plays audio files from my network, plays specifically formated videos from my network, pulls internet shows local and lets me pull most content from the TiVo to archive. There are other “features” that require payment that I don’t use – Amazon and TiVo are connected so you can purchase movies and have them delivered to your TIVo.
So, it’s 2009 and media center solutions abound. Freevo, MythTV, LinuxMCE, Microsoft MCE, XBMC, Boxee, ApplyTV, Piren, and a host of proprietary solutions. Many of those listed support ripping, audio, DVDs, transcoding, shoving them into a database, home automation, VoIP/PBX, YouTube, Google Video … the list goes on and on.
My needs are fairly trivial.
- Playback Video files for the common media types (avi, mpg2/4, mp3, wmv, rm, rmvb, mkv, xvid, divx, HiDef, and hysical DVDs); basically, anything that VLC can playback should be supported.
- Playback Audio files with playlists and common groupings (artist, album, genre, keyword, etc.); the interface of gnump3 would be fantasic, but Amarok and xmms are nice too. AC3 audio is mandatory.
- Image slide show – to show off all those travel photos.
- Connect to media locations on my network with sshfs, nfs, smb, and http
- Remember those locations and store the connection info securely
- Fast control over the aspect ratio, video size, and interlace/progressive
- Control the playback via a web or keyboard-only interface (no mouse); Ideally, my N800 will be the remote control
- No need to setup a “Media Library” to playback a stupid video. That’s were all those big solutions listed at the top fail.
- Not slow on a machine with dual core, 4GB ram, fast disk, and WiFi-G or faster networking. I just removed MythTv, XMBC, MS-MC, and LinuxMCE because they were all dog slow. Push a button, wait 10 seconds for something to happen slow. Windows Media Center was dog slow running on the main partition – not in a VM!
- I don’t need any recording
- I don’t need any ripping
- Just want to provide a URL to a few directory areas and go.
I find it odd that people put up with this BS. My MediaGate is fantastic except it doesn’t have the horsepower to play newer format video files.
So now I’m trying Piren. In theory, it is a tight, “live” media player distro. It is 250MB and doesn’t need to be installed. I plan to run it as a VM on my laptop. Crossing my fingers that this ends my search.
Laptop stuck during boot
So, I should have kept my mouth shut. After writing that last story, my laptop gets stuck during boot. Of course, it waited until I was on vacation. Leading up to that point, it had been fixable with a full, detailed , 3 hour scandisk. Now, it won’t get that far in the boot sequence. “Fix my computer” gets stuck. “Safe Mode” gets stuck.
Did I mention that Vista sucks?
I’ve performed the hardware tests. No issues. I think it is a logical problem with Vista’s file system. It get stuck loading crcdisk.sys when I watch the drivers being loaded.
Linux rescue disk … GO! I need to get my data and virtual machines off that machine before I can attempt to force it back to factory settings (assuming I can get to a boot prompt at all).
fixed … 11/30 … perhaps
I renamed crcdisk.sys and rebooted. All is well. Vista problem solving said that the problem is with Dell WiFi drivers. Google searches implied this driver file was for the built-in Creative Webcam. I find that very easy to believe, since Creative drivers have always been less than impressive to me.
12/4 Update
So, I thought the issue was fix. It wasn’t. I rebooted this morning to clear up a network issue and the BSOD happened in the same way again. Enough was enough. Out to the Dell Support site to get all the available patches, 22 of them. They range from a BIOS update to video drivers, to webcam drivers, to system information application updates, to DVD burner app updates. Anyway, they all appear to have installed cleanly, even the BIOS and my reboot was clean. I’m writing this from inside an ubuntu virtual machine running on the laptop. I’ve rebooted a few times, but not after VirtualBox has run. That is my last concern, is virutalbox leaving the system in a bad state or corrupting random drivers?