Archive for the 'Ruby on Rails' Category

The state of Linux package managemen sucks.

So here I am, wanting to set up a demo of something I’m working on for the public internets. I figure that since I have this big Cisco IPTV machine which will eventually replace Eron sitting here, I should go ahead and set my demo up on that.

And that is where my woes begin. Desu is running Debian and the project I’m working on is with Rails. Debian uses Apt for package management; Ruby uses Gems. Desu has *only* had Subversion, Apache2, and some webDAV module for Apache installed on it. No MySQL, no Ruby, no Gems, and certainly no ImageMagick.

I spend a few minutes installing Ruby. That’s a big ol’ apt-get install ruby irb rdoc ri because, you know, making a ruby-developers metapackage with the whole kit and kaboodle would be too much to ask from the Ubuntu folks. Instead, they just confuse the living shit out of mister Wow-web-2.0-is-cool-let-me-try-this-Ruby-stuff-out! because he’ll only type apt-get install ruby and then have no idea why IRB is not starting.

Then I go ahead and grab the latest version of Gems from RubyForge. I have no idea if there’s a package for this in the Ubuntu repositories, but I won’t bother with it, especially since Desu has Dapper on it. Since Gems can update itself, that’s not too big of a deal — or is it? Why should I need to install anything from a tarball?

But then, I go on to install my gems.

nevans@desu:~$ sudo gem install -y mysql rmagick rails mongrel

This fails spectacularly. I was missing a Ruby -dev package that I needed. I reran the command; it bombed out again. I tried installing a few MySQL packages until it worked. Then I installed the ImageMagick libraries (and the -dev!) to head off the next failure.

And then it struck me; why the hell do I need to worry about dependencies? I thought package managers were supposed to worry about those for me since it’s like, a computer and I’m a human being whose time is valuable.

Because Apt and Gems are two different package managers, of course! So, guys, where’s my meta-get install gems:rmagick gems:mysql gems:rails gems:mongrel?

Automagic Validation

I have a new test in my Rails arsenal: assert_valid_markup.

def assert_valid_markup(markup=@response.body)
  require 'net/http'
  response = Net::HTTP.start('validator.w3.org') do |w3c|
  query = 'fragment=' + CGI.escape(markup) + '&output=xml'
    w3c.post2('/check', query)
  end
  assert_equal 'Valid', response['x-w3c-validator-status']
end

Validating (X)HTML In Rails.

RailsDay & More

First and foremost - oops, looks like I didn’t get my four posts last week. Oh well. Maybe three a week is more reasonable…or I’m way too fucking lazy. Sheesh.

But on to business. I had planned to add another entry yesterday, but I got sidetracked. On Friday, Al asked me if I would be interested in joining him and Josh for their RailsDay2006 project. Since I hadn’t registered, I ended up not actually writing code, but I did do some extreme programming with Josh, without me actually typing anything. We came up with a half-finished e-mail autoresponder called on_vacation (source will be available soon!).

It’s a pretty nifty app. When we did our last checkin, it was able to check someone’s pop3 account for new messages, ensure that we had not responded to the message, queue a response to be sent, mark that e-mail as autoresponded to, and finally send autoresponses. There was also a frontend with a signup/login thing. We didn’t quite get around to implementing an away message management screen, though.


Our Commits

The SuperBestFriends’ Progress

In other news, I did some web designing today. I’m not entirely sure where I’m headed with this, but have a look: freePets.

subSyndicate

Once again, Yasashii has issued a press release regarding something I’ve done.

I purchased David Black’s book, Ruby for Rails, and was inspired to mogg together a (non-Rails) Ruby program to syndicate my SVN logs. Eventually, you guys may see my add the feed to OwlManAtt.com. I’m not sure yet…

I’m proud of the name of the fucking thing, too. subSyndicate is so perfect - Subversion Syndication, released by the Syndicate. I lol’d.

I would also like to point out that I’ve released this under the MIT license instead of the GPL. That’s a first for me.

Calgary, Alberta (Yasashiisyndicate.org) - Syndicate member Nicholas Evans is pleased to announce the Syndicate’s first software release, the subSyndicate Subversion Syndicator for UNIX and Linux.

About subSyndicate
The subSyndicate Subversion Syndicator is a simple piece of software designed to allow easy publishing of your Subversion logs via Really Simple Syndication, an Internet standard for content syndication.

Because subSyndicate is implemented in the Ruby programming language, it is portable across all UNIX and UNIX-Like (Linux) systems that are supported by the Ruby runtime environment. Support for Microsoft Windows is so far untested, but is theoretically possible.

About The Yasashii Syndicate
The Yasashii Syndicate, otherwise known as the Gentle Syndicate, is an organization dedicated to its execution of The Sekrit Plan. The Sekrit Plan’s goals, to outsiders, seem strange and mysterious. To syndicate members, however, The Sekrit Plan makes perfect fucking sense.

For more information about the Yasashii Syndicate, please see yasashiisyndicate.org/about.

subSyndicate

Warm & Fuzzies: Workshop For Good

So at our last SCOSUG meeting, Al Gordon mentioned that there was going to be a Ruby on Rails workshop in DC that he was thinking about attending. This workshop is called ‘Workshop For Good‘, and it’s being put together by a teacher at a DC highschool.

Naturally, a Ruby on Rails workshop piqued my curiosity. Since Al was going, he said I could tag along with him…so I signed up. Currently, I’m #1 on the waiting list, but (judging by the email conversation I had with the organizer), I’m in, thanks to Al giving him a bit of a nudge. Kudos to Al.

As you may have infered from the name, this workshop isn’t Just Another RoR Class. It’s actually a fundrasier for the Chavez Public Charter School. From the Workshop’s ‘Purpose’ page, it seems like Chavez has been doing a lot for the community.

Our typical student enters 9th grade reading on a 4th grade level. Without significant improvement there is no way that student can succeed in college. We have a rigorous literacy program that pushes ability to the maximum rate of improvement. Last year our students showed more improvement in reading ability than any other school in DC.

Sadly, Chavez isn’t as much of a financial success as Yale has been (you know, Chavez can’t afford to buy Washington D.C. </yale-burn>).

Things that most people take for granted are missing in DC public schools. It’s a luxury for a class to have textbooks – you can practically forget about students having their own copy. Technology is largely outdated and worn down.

Hence, the fundrasier. It’s been a $400 registration fee. All five of the student slots had been filled by the time I registered (bloody college students, always whining about their student debts…it’s all beer money to them!). Because it’s charity, and for people who seem to know what they’re doing, I don’t mind the extra $200.

So I guess OwlManAtt will be doing DC in a few weeks. The trip is still sort of being planned. Cya down south!

Next Page »