Tagged: homebrew

September 26th, 2010

Cinderella and Story Telling – Have a Point!

This is a story about a well intentioned but unskilled blog writer. Let’s call him Mike. He started blogging to learn about writing amongst other things.

Today’s lesson is to remember to have a point for each post if the post is meant to impart some useful nugget of wisdom. Some posts are less focused narratives, in this case the point of the post is to tell a story. For both kinds of post having an understanding of “the point” makes it easier to write and review the post, and might make the post more useful to readers, including himself. As an example:

Recently he wanted to tell a colleague how he had installed rvm on his mac. “No problem,” he thought “I’ve blogged about it, so I’ll be able to figure it out.” Alas no. Digging around in the blog posts revealed a mass of confusing detail which was not that enlightening in retrospect.

It might have help to outline the post:

  • What was the point?
    • To describe setting up up a development environment on a Mac which allowed for running rvm without requiring administrator access (with the concomitant risk of messing up the system).
  • What was the solution?
    • Install cider, now called cinderella, which itself installs homebrew and rvm all under ~/Developer.
  • Were there any problems?
    • Minor speedbump in the initial install from the cinderella (née cider) site instructions. He needed to add himself to the staff group using dseditgroup -o edit -u mike -p -a mike -t user staff
  • Is this likely to be reference material?
    • Hmmm, maybe he needs to add a page about his OS X development environment, rather than posts…

If he had thought “What is the point of this post?” and “If someone comes to this post in a few months will is be useful to them?” before hitting the Publish button then the post might have been a lot more useful. Maybe he’ll keep these points in mind when posting in future.

The point of this post was to record something I learned about writing on my blog. Maybe it will help me write better entries in the future.

August 29th, 2010

Slimming Down

A couple of things have happened recently which have highlighted ways I can slim things down a bit in terms of the number of things I need to keep track of and change the way I behave.

Thanks to homebrew, rvm, and MacVim I was well on my way to eliminating my use of VirtualBox for doing some of my own “tinkering” using a recent Ubuntu Linux as a familiar environment (I don’t have anything against Linux, it’s just less hassle for me not to have to start up a virtual machine to do some development…)

Ad a recent Toronto Perl Mongers meeting someone asked me about the modules I mentioned in a talk earlier this year and wondered if he could see the code. This had a cascade of effects:

  1. I put the code on GitHub so he could see it.
  2. I installed perlbrew and perl-5.12.1 on my Mac so I could start installing modules without breaking the system perl.
  3. I started updating some of the things I wanted to fix, but somehow hadn’t got around to fixing.
  4. I started goofing around with other Perl modules gratuitiously – for example using Moose to add a couple of attributes to a class despite its apparent ugliness, or common::sense rather than strict and warnings.

It’s amazing how the thought of other people’s eyes on my code are better motivators than my own diligence.

As the Toronto Perl Mongers web site generator was the only project of consequence I was doing on mu Linux VM I finally got to delete the old Linux VM and am now working in a pure OS X environment.

Using Moose has started slimming down my modules, as much of the boiler plate code seems to vanish.

My home tinkering environment has slimmed down, but I suspect the pitcher of beer and chicken fingers at the Perl Mongers meeting has caused some equal and opposite reaction in me!

July 24th, 2010

cider, rvm, and homebrew

The rails installed by cider is a rails 3 beta. As I want to play with some of the examples for rails 2 I thought I should get the most recent ruby 1.8.7 and try to use rvm’s gem sets to get myself a rails 2 world set up

brew install `brew outdated`
rvm install ruby-1.8.7-p299
rvm --default ruby-1.8.7-p299

Was my first step to this, but when I tried irb this is what I saw:

ratdog:~ mike$ irb
no such file to load -- map_by_method
ruby-1.8.7-p299 > q

The cause of this was my ~/.irbrc which had been set up, and which has a whole bundle of useful gems added into it. Most of these are worth a post by themselves, but the suspects were:

  • map_by_method
  • what_methods
  • awesome_print
  • net-http-spy
  • hirb
  • looksee
  • wirble
  • sketches

I set up an rvm gemset and started installing gems:

rvm gemset create rails238
rvm ruby-1.8.7-p299@rails238
gem install map_by_method what_methods awesome_print net-http-spy hirb looksee wirble sketches
gem install rails -v 2.3.8
rvm --default ruby-1.8.7-p299@rails238

All appeared to go well, until I tried navigating to a demo appliction and look at the environment on the default splash screen, which complained about a missing sqlite3 gem. The sqlite3 gem wanted at least ruby-1.9.1 installed, so it was time to install another Ruby.

The ruby-1.9.1-p429 had a problem with gems, but a quick trip to Yahoo! revealed this message, so it was time to install another ruby!

rvm install ruby-1.9.1-p378
rvm use ruby-1.9.1-p378 --default
rvm gemset create rails238
rvm use ruby-1.9.1-p378@rails238 --default
gem install map_by_method what_methods awesome_print net-http-spy hirb looksee wirble sketches
gem install rails -v 2.3.8
gem install sqlite3

Now I can get to work playing with rails! The great thing is that I haven’t compromised my system Ruby, thanks to cider, rvm, and homebrew.