Just a brief note on getting the new ActiveAdmin gem working with Heroku under Rails 3.1 (on Thin and probably some other servers too)
ActiveAdmin looks like a really useful tool to avoid Scaffold-itis when it comes to admin interfacing in Rails apps. You install the gem and loosely define what models you’re using; and you can create simple effective dashboards.
It works easily on local testing, but when you deploy to production on Heroku (or locally with thin $ bundle exec rails server thin -e production the build will fail citing /Users/dave/.rvm/gems/ruby-1.9.2-p290/gems/sass-rails-3.1.0/lib/sass/rails/railtie.rb:38:in `block in ': uninitialized constant Sass::Rails::SassTemplate (NameError)… or similar.
By default the SASS gem is defined within ‘assets’ in the Gemfile. Move the line
group :assets do
gem 'sass-rails', " ~> 3.1.0"
..
end
outside the assets group, and it will spin up without a problem. It seems the assets group is processed after other gems.
This article originally appeared in the Lawkit #4. Read more at http://lawk.it/
Once upon a time, everything was simpler.
A friendship was a construct based on shared memories and experience. The web was one of many, and it hung between idle walls. A tablet was something that came in a packet of 16 and the internet was the demesne of nuclear scientists and the military.
The Commodore and Atari era eluded me, too young and more interested in working out how to stand on my bike while stationary and climbing the horse chestnut tree. A green screened Amstrad was my first computer. It was used for accounts, not mine, and writing. Two front-loaded disks and a distinct lack of entertainment ensued. To play a game it had to be ‘loaded’, not by disk, not by air… a different experience to the application store process of today. A few hours of typing left you with a glitchy but functional circa 1990 version of Donkey Kong without splashing out on the original Nintendo… which eventually was bought.
The darling of 2010, Angry Birds, this was not. There was no point and click, and drag and fling. This took effort and you earned reward. Auto-save did not exist.
Fast-forward a few years to the beginnings of the web. The actual Internet, this time. It has been said that technology loses its capitalisation once it reaches mass appeal; we’re nearly there. The web itself is 20 years old this week, the original document still exists. By the late nineties websites were bright, garish and their contents moved around too much. Where hamsters danced, badgers followed a few years after. Floppy disks started to die out. You remember it. That’s probably when you Got The Internet.
The Internet: Normal People need not have applied.
A “Web Community” was an ecosystem fostered by people who while separated by distance would be the sort that would interact in real life. University researchers, the military, scientists and, let’s face it, fans of primitive text-based computer games. You can’t see the bytes past the nerds.
What am I getting at here? Well, in the Old Days communities were fostered by benevolent dictators. Bulletin Boards (the pre-cursors to forums) had the moderators and if you stepped out of line or acted like a troll you got warned or banned; mailing lists were the same. Access was for the few, and it was earned.
Early adopters of services like Twitter ‘got it’. There was no celebrity and none was required. The groups who formed on Twitter were like those from the early days. Your circle of followers was related to a real life concept. Of the first thirty people I ‘followed’ twenty five were members of a website hosting company’s community which continues to this day. The other five were Mac Rumours, Dave, Ruth, Andy and Alan. Four local web people, friends or acquaintance in real life. See?
Soon, entertaining and intelligent celebs like Stephen Fry arrived, John Mayer came and left, and Ashton Kutcher was one of the first to break the million mark. All three gained huge numbers of followers and engaged with their fans. The latter I don’t know about, but Fry seemed to nearly have a twitter breakdown, and Mayer eventually left because he felt it inhibited his creativity. A case of throwing the baby out with the bathwater perhaps, but anyone with RSI (Refreshing Stream Injury?) will tell you—sometimes switching off is the best way to let yourself think.
Trolls. Keyboard Warriors. Lowest common denominator idiots.
Not the stars, not even loudmouthed (and entertaining) characters like Piers Morgan, but the normal people. The fans who clamour for attention and recognition from their heroes. The masses who pester the footballers and TV stars for retweets of their charitable or vain causes. The many who believe for some reason that a retweet or a shout out will bring them some fame of their own. It only serves, in my humble opinion, to irritate the aforementioned famous folks to an extent where Twitter will probably just become a PR tool and not something they engage in.
How do you weed the wheat from the chaff? Unfollow after mentioned Famous People. Which is a shame.
An option for users to be able to tick a box and instantly ignore all those who have ever used the phrase “please RT” — it would probably make the world a better place. I’m sure.
The Great Unwashed
Every technology changes once it reaches the mass market. After the early adopters have helped mould a product in the form they desire: Facebook added Apps, Twitter recognised that users were “retweeting”, “@-replying” and “DMing” and updated their platform to make these features.
The public, however, have a habit of ruining the fun for everyone else.
This article originally appeared in the Lawkit #4. Read more at http://lawk.it/
Life as we know it, edition 4 has just been published. Once a month Fairly regularly, Peter and I along with a host of collaborating authors put together a little journal primarily because we think storytelling is important.
For the first time it includes an article by yours truly, snappily entitled “Twitter and The Great Unwashed: how “normal” people ruined The Internet for the rest of us.”
A brief intro here, I’ll publish the (slightly ranty, a bit geeky) article in full here in a few weeks.
Once upon a time, everything was simpler
A friendship was a construct based on shared memories and experience. The web was one of many, and it hung between idle walls. A tablet was something that came in a packet of 16 and the internet was the demesne of nuclear scientists and the military.
The Commodore and Atari era eluded me, too young and more interested in working out how to stand on my bike while stationary and climbing the horse chestnut tree. A green screened Amstrad was my first computer. It was used for accounts, not mine, and writing. Two front-loaded disks and a distinct lack of entertainment ensued. To play a game it had to be ‘loaded’, not by disk, not by air… a different experience to the application store process of today. A few hours of typing left you with a glitchy but functional circa 1990 version of Donkey Kong without splashing out on the original Nintendo… which eventually was bought.
The darling of 2010, Angry Birds, this was not. There was no point and click, and drag and fling. This took effort and you earned reward. Auto-save did not exist.
The football season has started, the summer warm-ups have begun in rugby, the cricket tests … well, cricket never really stops, does it?
I’m happy about this. I went out to watch my team’s opening day fixture, I’ve made some preliminary plans to make my first trip to North London on a match day.
I’ve an issue with being a dedicated sports fan: I despise idol-worship. Being an Arsenal fan, I feel the disappointment and the happiness of a win as much as your average armchair fan. However, the thought of getting a player’s name emblazoned on my replica shirt (which I got for free with my last broadband package, go figure!) sits very uneasy with me. Not least because next season they could be gone to some other club.
Things changed in April 2010.
As for the previous four full seasons, I’d been at nearly every Belfast Giants game since mid-September. Originally as a duty – I was helping out a friend who ran the video team – and latterly while working but more and more enjoying the game, and the atmosphere. The Giants were all set for the quarter final game; possibly their last of the season. A home-and-away double header against the Newcastle Vipers, a team now extinct after they folded this summer. Belfast emerged victorious, whitewashing the Newcastle team 10-3 over the two-legged fixture. A swift advance then, to the Easter weekend finals.
Penalties decided the Giants v Nottingham Panthers semi-final after 65 minutes (60 regular + 5 minutes of sudden death) – a gritty affair with one of the Panthers players sent packing a few minutes early.
Before the final I experienced something I’d never really been through before: My team, in front of me, in a position to achieve glory or insignificance.
I was toting a HD video camera; not an unusual task at the time, but this was a little different. This was to capture the fans, not the game. The game passed by with a normal level of interest, a cheer when Brandon and George scored for the giants in the 22nd and 32nd minutes, a groan when Max Birbraer made it 2-2 with two goals before the final period began. Tension for twenty minutes until the end of regulation and five minutes of bouncing heels through sudden death overtime.
Words really don’t do justice to the nail-biting edge of the penalty shots. I was trying to hold a camera steady and hoping for a glimpse of steel from Stephen Murphy in the Giants net. I wanted to see the fans around me roar when Cheverie, Walsh and Szwez took their turns, but all three missed the net. Thankfully Murphy had the steel, he stopped all four of Cardiff’s attempts. Evan Cheverie took the fourth shot and scored sending the team and the fans crazy with the win.
So. The new years begins in a fortnight with a double header pre-season friendly in Belfast hosting the Nottingham Panthers. Not your average pre-season. The Panthers are hated rivals (as much as can-be in a non-native sport market) and it should be a decent show.
Usually I would be promoting our webcast but we won’t be broadcasting this particular game. Check it out some time though, and if you’ve never been or seen, hit me up for a free view and I’ll send one your way.
It’s been out for a few months now, but I only discovered Sky Arts last night. A proper Radio 2 like channel for those who left the MTV generation before they knew they were supposed to be in it. They show some pretty cool music live shows and documentaries — this morning Eric Clapton’s Crossroads Music Festival and Mark Knopfler live in Basel were on the card.
Things I dream of #1: XKCD coming back with another series like The Barrel Boy.
Starting with issue one the “Barrel” boy floats along innocently. We don’t have a name, a reason or a destination, but if you’re half the secret romantic I am then you’ll have at least a tiny heart twinge when the story unfolds.
Here’s the Barrel Boy series as reproduced from xkcd.com.
Tonight on GiantsLive.tv the Shane Johnson All Stars team featuring Paxton Schulte, Todd Kelman, Rob Stewart, Colin Ward and Jason Bowen take on the current Belfast Giants team in Shane’s testimonial match.
Enough’s been said about it on the Giants website and the event’s Facebook page already, but we’ve just announced the game will be broadcast, and so if you can’t get to the Odyssey (tickets are still available) you can watch online.
Summer of 2008 I spent most of the summer roasting in Upstate New York working at camp, mostly working with video and photo, preparing the camp’s media that year.
I had the pleasure of re-visiting New York City at the end of the summer and picked up a new Nikon D80 in the Giant Jewish Argos (an amazing place!)
Last weekend I got a new lens.
Ken Rockwell, whose site is a great internet resource for camera reviews, real life lens tests and opinion on which cameras and lenses go well together, has a review of it here. He doesn’t necessarily recommend it for a “DX” body like my D80, as 17-35mm becomes cropped to ~27-55mm, but upon consultation and a quick road test, decided it was the one for me. An affordable [edit: actually, affordable is not quite the right word] wide lens with a short zoom and fast f2.8 would turn a camera I know has potential into one that will help me compose the photo I want.
Bokeh isn’t everything, but it sure tastes sweet.
Photo Blogs
Over the last few weeks I’ve come across a great selection of photo blogs, whether their content be stunning imagery, useful tips or an eclectic mix of those and more.
This site from MSNBC was launched a few weeks ago, a tumble-log format photo blog updated a couple of times per day with the best press and sports photos they can find.
Pictoryis a showcase of photographs, stories and infographics. I particularly enjoy the New York Series — featuring loads of real life imagery with real depth and nostalgia.
I came across Lisa Bettany‘s work a few days ago, I especially love her series of shots on bad photography.
I noticed all the crummy photos I’ve taken over the last few years. After feeling mildly embarrassed, I realized how much I’ve actually learned about photography, simply from taking bad photos.
Do you have any favourite photo blogs? I’ve no intention of starting my own, but it’d be amazing to have the content and endeavour to do so.
Step 1 in the “Moving my blog” process is “Extract the current site’s data into a manageable format”
Frankly, that’s easy! WordPress has a functionality to export the site’s content to a single XML file containing all the published Categories, Tags, Posts, Pages and Comments. To do this (WordPress v2.9.2) click Tools > Export and save the file. In previous versions of the software I believe it’s under the Manage menu.
I’m aware I could import the data directly from the WordPress database (to wherever it goes in the end) but let’s imagine we can’t. Anyway, database access would be tediously slow and inefficient to test against and implement.
A quick google for “import wordpress xml ruby” threw up nothing helpful so I turned to the Ruby XML libraries. John Nunemaker “feverishly posts everything he learns” at railstips.org and has two articles of use here:
The latter deals with three different ruby xml libraries and compares their speed, ease of use and how nice their names are to say. He puts REXML, hpricot and libxml-ruby. I’ll save you the pleasure of reading the article (if you like) and ccv John’s summary:
“Libxml is blisteringly fast, [but] Hpricot has cooler name, REXML and Hpricot both feel easier to use out of the box”
And there you go. Hpricot it is!
Now to get the data into Ruby. After a quick glance at the rubytips article and The RDocs I put together this code as a starting point:
cats_hierarchy={}
(doc/"wp:category").each do |category|
cat_name = category.at("wp:category_nicename").innerHTML
cat_parent = category.at("wp:category_parent").innerHTML
if cats_hierarchy.include? cat_parent
cats_hierarchy[cat_parent] = cat_name
else
cats_hierarchy[cat_name] = []
end
end
cats = cats_hierarchy.to_a.flatten
That gives me two each to use Ruby objects each containing all of my category data: a hash which preserves the hierarchy of the structure and all the names in a linear array.
I want to get away from this current site, it doesn’t show off anything of my professional work nor does the site itself actually resemble or build on anything I’ve made (apart, obviously, from WordPress site implementations).
How to go about this?
Well, I’ve identified the steps I need to go through to migrate the site from WordPress to a Ruby based site, either Rails or Sinatra (just to try my hand something a little different). Actually if heroku get it sorted in time I may throw together a Node.js application — they can be fun.
These aren’t necessarily in the right order at but I will approach them all independently and hope to blog through the process.