Posts Tagged ‘Ubuntu’

Ruby on Rails and in Apache “gotcha”

Friday, January 9th, 2009

I’ve installed Apache, installed ruby on rails.
Ruby on Rails works fine on the weBRICK server, but it’s not working on the apache server, just giving me a 500 Internal Server Error.
Better check the logs.
ls -ltr ~/www/myApp/log/

Lo and behold, production server’s the most recently modified!
Check its log, see stuff like:

Status: 500 Internal Server Error
Could not find table ’sessions’

This has gotten me three times using the Ubuntu Community Documentation. It’s in there, but it’s not formatted as an instruction.
Relevant text:

murb: I had to add RailsEnv development as well to get around the ‘no route found to match “/rails/info/properties” with {:method=>:get}’ warning… (can someone elaborate on why?) apparently this is because /info/properties is buggy and no longer supported: http://www.ruby-forum.com/topic/161924

(emphasis mine)

I added RailsEnv development to my httpd.conf, bounced apache, and everything started firing away smooth as silk.

VirtualBox and Vista

Sunday, December 21st, 2008

The ordeal is over. I upgraded my computer in July. I lazied out and decided to spend a little more money and have experts build it for me. I knew I’d pay a premium for it, but frankly I didn’t know enough about the current high-end gaming rigs and what it takes to put them together.

The last time I built my own computer from scratch was in college, and I was dealing with a bunch of fly-by-night places and buying the cheapest stuff I could find. Naturally, the computer didn’t work and eventually my father had to step in and help me fix it. (Important lesson was learned here: the cheapest is almost never the right solution; you’d better be damn sure you know WHY they’re cheapest if you’re going with them)

This colored my perspective on rolling my own. . . until this one. First off, the company I purchased it from -Vigor Gaming, has been nothing but professional the whole way. The machine I bought from them is a freakin’ beast. Unfortunately, I ordered it in July and ended up getting it working in December. Motherboard issues, damage during shipping, you name it. The last time through we shipped the video card separately from the computer, and I installed it when the machine got here. It worked.
If it had been my own machine, I think it would have been a much faster turnaround time to have it up and running, but all in all it was just bad luck.

But the good news is: THE SYSTEM IS HERE!
I’ve been spending the last week or so getting it configured. Vista’s . . . not as good as Ubuntu but not horrible. It runs Left for Dead and Fallout 3, so it’s serving its purpose.
I’m running VirtualBox inside Vista, with an Ubuntu Intrepid Ibex sitting inside of it. I’ve been configuring it the last week or so, trying to get back up to speed from the configurations on the old development box. The .bash files were fine, but getting some of the applications back to where I want them are taking a bit of time.

Fortunately, I’m pretty close to having a functional development environment again.
This time I’ll get a snapshot of it so it’s frozen.

(minor aside – god bless subversion. I somehow wiped out all the files in my working copy when I moved from my other machine. Just a quick svn checkout and I was good to go, ready to keep on jamming)

So currently it’s:
Vista running VirtuaDesktop, setting up 4 desktops.
I’m running VirtualBox Ubuntu 8.10 on one as a development environment
I’ve started to set up Samurize, but I might end up skipping that. I’m trying to figure out what the balance should be on what gets done where. . . is Ubuntu strictly the “write code and deploy” box, or will I run Evolution there, etc

Work in process.

Intrepid Ibex upgrade – COMPLETE

Wednesday, December 3rd, 2008

Upgraded from the LTS version of Ubuntu to Intrepid Ibex last night.
Wouldn’t you know it? The fine team working on the Ibex release had hunted down and killed the issues described in the previous post.

One false start (hitting cancel in the middle of the operation doesn’t make it go swimmingly – PEBKAC!), then one successful installation.

Full 3D acceleration is now mine.
If only it would play Fallout 3.
(mantra: this is a development box. This is a development box. This is a development box)

I hate ATI (but doesn’t everybody?)

Tuesday, December 2nd, 2008

I’ve spent about 3 days now trying to get 3d acceleration working with my ATI 1600 graphics card on Ubuntu Hardy Heron LTS.
Nada, zip, zilch.
I’ve tried:

  1. Enabling the drivers via System –> Administration –> Hardware Drivers
  2. Manually installing the packages via apt-get install
  3. Following the Hardy Heron ATI installation guide manual steps
  4. Manually tweaking my Xorg.conf after all three methods above on the off chance that would work

But alas, nothing.
It appears as though it just plain doesn’t recognize the ATI card, but when I use the command lscpci it returns the right values… 01:00.0 VGA compatible controller: ATI Technologies Inc RV530 [Radeon X1600]

Now the last thing it might be is the fact that it’s a dual input card, and I’m using the secondary input. Combine that with a troublesome monitor (Gateway FPD2185W) and it’s a recipe for disaster I guess.

Anyhow, I’m done with it for a while; this is supposed to be a development box, not a gaming rig.


I’ve also been breaking my head against the wall with Ruby on Rails. Programming by coincidence again. . . but I’m not sure what I’d do differently at this point.
I don’t have a strong grasp on the syntax of either Ruby OR Rails, so I’m in a position where I’m taking examples strewn about the net, and patching them together with my own crazy-town requirements.
Scaffolding, while very powerful, was/is quite counterintuitive to me. It’s difficult to grasp the idea that a class’s get methods are wrapped up in calls I can’t seem to find.

What I’m trying to do is relatively simple – maintain/display a list of stand-up comedians in the Chicago area, and the expats/deceased. My table structure’s basic – firstname, lastname, URL, status. I chose to make the status an int for extensibility reasons; if I used a boolean it was guaranteed a requirement would appear for separating expats and deceased. . . with an int I can extend if it’s needed.

Here’s the crappy PHP version I’d cobbled together months ago: Comedian Listing
There’s a variety of weaknesses with it – for starters:

  • the whole tiki-wiki platform’s too ambitious. There’s too much there for anyone but a developer to love, and comedians are not developers.
  • Extending tiki-wiki’s pages requires a helluva lot of effort OR breaking the twiki upgrade path
  • There’s no easy way for any other comedian to interface with the page, making adding/moving comedians very difficult unless. . . once again . . . I extend the heck out of it and break the upgrade path.
  • Finally, the page scrolls left to right across columns, not vertically as the eye expects. This is a flaw in my code, but is still an overall weakness.

So I’ve cobbled together a development environment for RoR, imported the comedian listing into a new MySQL database, and whipped together the functionality I need.
Took all day for the “15 minute blog” framework, but that’s my ignorance at work.

Here’s some juicy bits for anyone’s who’s still reading: this is the framework I used to solve the multi-column display in ChicagoStandup 2.0. If you work with multiple columns at all, this is a fantastic way to have them behave appropriately without resorting to tables.
Quite a gem, and I’m glad Randy Simons did all the work. Cheers, Randy, you saved me a ton of time.