Bustikated

Equal parts geeknobabble & jackassery

Phoenix Ruby Users Group

Posted by BM5k on August 19, 2008 at 07:47 PM

List of crap we’d like to talk about

  • Camping / Merb / Rack
  • PDF / Image Libs
  • Config Mgmt / Cruise Control
  • Passenger
  • REST
  • Attachment Plugins
  • Mock / Stubs
  • Testing frameworks
  • Messaging Queues
  • Search Index (Solr/Sphinx)
  • Fixtures
  • Javascript
  • GIT / SVN
  • Deployment / Capistrano / Vlad
  • Thin Controllers / Fat Models / No Logic in Views
  • Work process
  • E-Commerce / Activemerchant
  • BJ / Background DRB
  • Charts & Graphs

Rails + vCard

Posted by BM5k on June 19, 2008 at 04:52 AM

I was looking at microformats for use in a current project, and decided that I’d like a way to export contact data as a vCard. A quick google search revealed this, which just happens to be by Derek Neighbors. It uses the VPIM library, which I found here.

Being the “There’s no way I’ll remember any of this later” person that I am, I tossed this into a pastie, and am blogging about it more for my benefit than yours.

WeeMap 0.0.4

Posted by BM5k on May 14, 2008 at 09:30 AM

I’ve updated the live WeeMap with the numerous minor changes in the last few days.

  • Corrected email subjects
  • User info bar (with username and logout link)
  • Login redirects to Maps instead of Home
  • Various tweaks

The BIGGEST change in this release is the addition of tag based filtering/searching.

And with that, I’m off to bed. Be sure to check back here or the lighthouse for support/feedback.

Oh, and I’ve created a topic on the WeeWar Tangler Group for the app as well. Trying to keep everyone up to date.

WeeMap is Live!

Posted by BM5k on May 09, 2008 at 05:49 AM

My simple little WeeWar maps app is live!

Check it out: WeeMap

DNS might still be updating, so check back if it’s down for you.

Warehouse + Leopard Server

Posted by BM5k on April 13, 2008 at 04:03 AM

I’ve managed to get SVN & Warehouse somewhat up and running on my server, and now that he’s online, I’m trying to get everything 100%.

Right now, I’m testing the following post-commit hook in one of my repositories to see if it works. The directory names have been changed to match my server, but otherwise this is just the basic suggestion from the Warehouse FAQ.

#!/bin/sh
cd /Library/WebServer/Rails/warehouse-1.1.6
/usr/bin/rake warehouse:post_commit \
RAILS_ENV=production \
REPO_PATH=$1 \
REVISION=$2

CSS Media Fu

Posted by BM5k on March 21, 2008 at 10:51 PM

Inspired by a similar php solution found here, I decided to try and do this in Rails.

I quickly realized that something like this could be implemented as a plugin, in spite of it’s simplicity.

Google led me to this howto on creating generators, and following along with this and another of Urubatan’s guides, I was able to get a working plugin created.

Installation

As of right now, I do not have a public subversion repository. This should change within a week or two. The only way to install the plugin is to manually unzip it into your application’s vendor/plugin directory.

Get the zip here

This is my first plug-in, and was written more as a chance for me to explore plugin creation than out of necessity.

If you’re interested in creating your own plugin, you can read my notes by clicking ‘more’.

more

More WeeWar

Posted by BM5k on March 21, 2008 at 02:37 AM

Why am I such a WeeWar junkie? For starters, turn based strategy games are awesome. Then you’ve got the fact that WeeWar is a pretty open game (ie the API). Combine all that with me needing projects just like this to learn RoR, and you’ve got full on addiction.

Since GoDaddy’s (expected) response of “Go Screw Yourself” to my Update Gem Request, I’ve had to resort to a less interactive means of showing off my mad bad Rails fu. I give you the awesome screenshot.

This is part of a table that will list unit attack & defense strengths, as well as movement ranges on the various terrains of WeeWar. This info can be helpful while trying to design your maps, esp when it comes to placing starting units.

Comments: 1 (view/add your own) Tags: RoR, WeeWar

No go from Godaddy

Posted by BM5k on March 20, 2008 at 07:42 PM

As expected, I received a ‘you’re not important, so we’re not updating our system gems’ message from GoDaddy.

While this sucks, I’ve resorted to plan ‘b’ ship my mini, Hobbes, out to be colocated a little earlier than planned.

I don’t plan on renewing my hosting contract with GoDaddy, and I haven’t since I bought the mini, so I’m not really that upset by their response. The biggest disappointment is not being able to publish my lil weemap app.

WeeWar custom map makers and players will just have to wait a little longer. Hobbes should be online in a week or so.

Godaddy v Rails

Posted by BM5k on March 19, 2008 at 11:37 PM

Ok. I’ve re-uploaded the gems. Still nothing. I switched over to development mode and CGI instead of fastCGI and finally started seeing error messages. Turns out GoDaddy is running old system GEMs, and needs to update.

The biggest problem here is that I’ve frozen my rails version to my app’s vendor/ directory. There should be nothing else (core Rails wise) that is needed to run my app. I’m not using any non-standard gems, and my plugins are all in the app itself.

For more details on the exact issue I’ve run up against, see this ticket

This ticket has been listed as ‘invalid’. Such a shame that the core developers disregard those of us who eek out a meager existence on shared servers.

Putting your GEMs on Ice

Posted by BM5k on March 19, 2008 at 09:53 AM

Mostly for my benefit later, but maybe helpful to you other rails newbs: I always seem to not be able to find this quickly when I want to freeze mah gems. It isn’t that hard, I’m just that absent minded.

To lock in a specific version:
rake rails:freeze:edge TAG=rel_2-0-2
Ensure all your config files match:
rake rails:update:configs
To double check which version is actually being run by your app:
script/about

WeeWar Map App v0.01

Posted by BM5k on March 17, 2008 at 12:00 AM

I’ve thrown together a lil rails app for providing feedback on WeeWar maps.

I’ll be honest, right now it isn’t that great. But I’m still working on it. Besides, it’s my very first published rails app. Hell, it’s my first published web app in a LONG time.

Which is your favorite WeeMap?

Due to the instability of the app, I’ve decided to release as private beta, you’ll need a key to join. Also, the app requires your weewar api key. The way it works is you provide your weewar login and api key to guarantee that you have the same name here as in weewar. It’s just better that way.

Let me say it again, yes this is a VERY early release. Yes there are several features that I want to add or fix. If you have constructive criticism or bugs, please leave comments. I hope to have a better method of leaving feedback up shortly (looking into lighthouse for tickets, and beast for a forum)

I’m not responsible for anything other than amusement that comes out of this app!!!

Oh, and the only way to get an invite is to ask ;)

Comments: 6 (view/add your own) Tags: App, RoR, WeeWar

Acts As Taggable on Steroids

Posted by BM5k on March 15, 2008 at 03:02 AM

Most of this was stolen directly from the Readme

Since I stole everything else, I figured I’d duplicate the donation link as well.

If you find this plugin useful, please consider a donation to the author to show your support!

Author’s Email: jonathan.viney@gmail.com

Installation

ruby script/plugin install
http://svn.viney.net.nz/things/rails/plugins/acts_as_taggable_on_steroids

ruby script/generate acts_as_taggable_migration
rake db:migrate

more

Comments: 0 (view/add your own) Tags: HOWTO, RoR, Ruby, Site

More attachment_fu Failure

Posted by BM5k on February 08, 2008 at 05:15 AM

Continuing the saga started here, I now have a legitimate business need to get image uploading working. (Before, I was just screwing around.) I am running into a different problem.

To make matters worse, I some how managed to screw up my svn repository for my previous attempt, and lost enough of the app structure that what’s left is useless.

I’ll be updating this post with things that I (re)discover along the way. First off, for a detailed description (including code, this time) of the problem I’m having, see this post at RailsForum.

more

Quick & Dirty Rails Subversion

Posted by BM5k on January 27, 2008 at 01:26 AM

There’s a good how-to over at the RoR Wiki but I’m going to repost a quick & dirty reference here, mostly for my own benefit the next time I go through this.

The point is to ignore sensitive info in the database.yml file, and the ever-changing log & tmp directories. I’m no SVN guru, so feel free to point out flaws in this system.

more