Monday, February 16th, 2009
What a huge pain in the ass.I just spent hours trying to get every combination of these two to work together and nothing worked. A handful of versions of libmemcached had no problems installing – .24, .25 and .26 were all easy to install, both from source and from macports. However, getting the memcached gem to install proved to be way way more difficult.I tried with a myriad of options – the most promising piece of information looked to be from this gentleman’s website – but also proved fruitless.The final solution, after a LOT of googling and clicking around the rubygem forums – this post at Evan Weaver’s blog. The libmemcached-0.25.14.tar.gz and memcached-0.13.gem tarball and gem, respectively, installed easily without any problems. After downloading all I had to run was:
tar -xzvf libmemcached-0.25.14.tar.gzcd libmemcached-0.25.14./configure && make && sudo make installcd ..sudo gem install memcached --no-rdoc --no-ri
Done.Finally.Update: There seems to be a few issues with the gem I link to being installed correctly in Snow Leopard. After spending too much time trying to figure out why the gem wouldn’t install, I installed the current memcached gem (from gemcutter) on a whim – and it compiled, and worked, without a problem instantly. So, if you’re running Snow Leopard and looking to install the memcached gem, try out the latest version first.One caveat – I’m still using the memcached server I linked to above, version 0.25.14, still from Evan Weaver’s site
Tags: development, gem, memcached, rails, ruby on rails, Work
Posted in Web Development, Whining, Work | 2 Comments »
Monday, August 11th, 2008
In getting up to speed with the new bells and whistles in Rails 2.0s RESTful routing capabilities I ran into something that puzzled me. Of the options for a resource defined among your routes there were two similar pieces that, for one reason or another, I could just not find a solid and bulletproof explanation for – :collection and :member. The :member part of it I got pretty easily for some reason, because its description is inherent in its own name … “a member among the default restful actions”. The :collection part? Notsomuch. After some digging in the Rails mailing list I ran into a great, and worthy, explanation for this knucklehead by a contributer named “deegee”:
For example, with map.resources :reviews, if you want to add a method ‘delete_all’ that deletes all reviews at once. You may want to call that with ‘/reviews/delete_all’ and method PUT (never use GET to delete something). This method is acting on all resources (a collection), so the route should be:
map.resources :reviews, :collection => { :delete_all => :put }
If you want to have a custom action acting on a specific resource, e.g. ‘/reviews/3/give_rating’, then your action is on a member and the route would be
map.resources :reviews, :member => { :give_rating => :put }
So that’s it! They’re the same other than :member working on a single resource, while :collection works on multiple. DONE!
Tags: development, enlightenment, rails, Work
Posted in Site Work, Web Development, Work | 1 Comment »
Wednesday, April 16th, 2008
There’s a really great post at this blog about how the writer, a developer named Ethan, was approached by some acquaintances with regard to a big idea they needed help in implementing. The usual banter ensues, in which Ethan discusses the terms by which he expects to be compensated. Whether in equity or at an hourly rate of payment.
The response from his pitch-man?
Hey, so, we aren’t really prepared to pay. I mean there isn’t that much to it, it’s just a PHP website with a MySql database, I was hoping you could just throw it together as a favor. Oh well, thanks anyway
The rest of his post echoes pretty much exactly how I would feel in this situation. “There isn’t that much to it”. That line destroys me. To anyone that might ever make that assumption – take a moment to step back, and really think about what you’re saying. It blows my mind to think that there are people out there that are so quick to make the leap that “there isn’t much to” someone’s craft.
“Dear Mr. Architect – can you design this house for me for free? I mean, there isn’t much to it, it’s just a house with a foundation and some walls”.
On another semi-related note. If you’re looking for someone to jump in on an entrepreneurial venture – the challenge you should expect to be faced with is to find that one special, talented individual that might share the same passion as you on this particular topic. From my perspective – that’s the key. Passion. Unless it’s for pay, it’s hard for some to get truly amped to knock out the creative, or code, for your new project. I’ve tried the same approach – “Work with me on this! We’ll rule the world“. It’s too nebulous a proposition for most, unless they know they’re going to LOVE this thing you’re creating.
My conclusion – work my ass off for a little extra money to invest in the paid services of my friends to help me where the help is needed. I just can’t ever expect to get something knocked out of the park by someone who’s going on my word – “This is going to be HUGE!”. If my name was short for something like … Joelstradamus … then maybe I’d be more eager to prognosticate on the magnitude of my many “next pet project”s.
Tags: business, development, entrepreneurship, Work
Posted in Web Development, Work | No Comments »