Archive

Archive for July, 2009

Determine location of ruby gems

July 31st, 2009

Not hard:

gem environment

You can even get free bonus information about where ruby and rubygems are… but only if you order now. For a limited time, we’ll even throw in the command that got us this gem of an answer: “gem help commands”

Bill Uncategorized

Copy aptitude packages between Linux (Ubuntu) Computers/Systems/Installations

July 26th, 2009

Surprising this isn’t better Google-documented. Here’s how I do it.

Make a list of your existing gems in a text file (run from machine with gems already installed):

sudo dpkg --get-selections | awk '{print $1}' > installedpackages

Copy the file to your new system. Then run:

cat installedpackages | xargs sudo aptitude install -y

It’s run through each line of your gemlist file and run “sudo aptitude install -y” on it.

Bill Uncategorized

Copy Ruby Gems Between Ruby Installations/Computers/Systems

July 26th, 2009

Surprising this isn’t better Google-documented.  Here’s how I do it.

Make a list of your existing gems in a text file (run from machine with gems already installed):

gem list | tail -n+4 | awk '{print $1}' > gemlist

Copy the file to your new system.  Make sure your new system has the packages installed that will be needed to build your gems (such as ruby1.8, ruby1.8-dev, rubygems1.8).  Then run:

cat gemlist | xargs sudo gem install

It’s run through each line of your gemlist file and run sudo gem install on it.  If you don’t sudo install your gems, you can remove that bit about sudo.

Or if you want to go for the gold with a single command line:

ssh -o 'StrictHostKeyChecking=no' #{gem_server} #{path_to_gem} list | tail -n+1 | awk '{print $1 $2}' | sed 's/(/ --version /' | sed 's/)//' | tail -n+3 | xargs -n 3 #{path_to_gem} install

After installing REE 1.8.7, I used a slight permutation of this to install my gems with Ruby 1.8.7 from their previous Ruby 1.8.6 installation (previous gem install was accessible as “gem”, REE 1.8.7 gem accessible as “/opt/ruby-enterprise-1.8.7-20090928/bin/gem”):

gem list | tail -n+1 | awk '{print $1 $2}' | sed 's/(/ --version /' | sed 's/)//' | tail -n+3 | xargs -n 3 /opt/ruby-enterprise-1.8.7-20090928/bin/gem install

That reinstalled all my existing gems with the REE 1.8.7 gem manager.

Bill Uncategorized

Justice Served: My Favorite Part of the Internet

July 13th, 2009

I’ve read two blog posts in the last day that remind me about my favorite part of the Internet, from a consumer perspective:  the opportunity for justice to be done to companies whose draconian policies make our lives as consumers worse.

The first post was Joel’s indictment of Circuit City (spot on in my experience… the only store I had ever gone to where I couldn’t make a return, with a receipt in hand for an unopened product purchased less than a week earlier).  The second was Lo Toney’s scathing assessment of some random IT company.

As a consumer, there is no more frustrating feeling than the one that comes when you’re dealing with a company that believes it has little to gain by making you happy.   In addition to Circuit City, I’ve felt this way dealing with Staples (wouldn’t let me make a totally reasonable return), and Chase+Paypal (pages take 10+ seconds to load on a regular basis).   Comcast has made me feel that way quite a bit too, although less so in the last couple months.

What is frustrating as a consumer is even more infuriating as an entrepreneur, because I understand that companies like these often have millions of dollars they could spend to improve service.  But when Powers that Be sit in their boardroom to discuss how to dole out the bounty of revenue, they want to find an equation that describes why they should invest in an improved customer experience.  When they can’t find one, the question becomes  ”Who cares if our unreasonable return policy upsets a few thousand people?  Our customers number in the mieeeeeellons. ”

But, by faciliating frictionless communication between a huge body of consumers,  the Internet has proven to be the great equalizer for these anti-customer companies.  And it seems that they are increasingly meeting the justice they deserve.  Circuit City is now gone, Comcast has been spending money in hopes to repair its image.  Just as telling, companies that do care about their customers, like Costco, Amazon, and Nordstrom have thrived in the “Communication Age” we now live in.

It seems that the cost of leaving your customers frustrated is increasing with every new Facebook, Twitter, or LiveJournal account that gets registered (not to mention Yelp).  As an avowed lover of justice, this trend has my vote as one of the best developments of the last 10 years.  I hope & believe we’ll continue to see movement toward customer-friendly policies, as the communication pathways afforded by the web lay waste to old-guard companies that still don’t “get” that frustrated customers cost a lot more than that one customer.

Bill Entrepreneurship

Amazon Unbox Change Registered User / Account

July 6th, 2009

So you installed the Unbox player when you were logged in as one user at Amazon, and later you purchased and downloaded videos as another user?

Well you’re going to hell, says Amazon.

I’ve just spent half an hour poring exhaustively through every nook and cranny of the Unbox UI, Unbox executable files, and even trying to go through the Modify/Repair options afforded by Windows, all to no avail. So far as I can tell, the Amazon account that you chose when you installed Unbox is the one and only account that you will be using with Unbox, unless you uninstall the entire player and reinstall it.

This is one of the few times that Amazon has chapped my hide.  Usually they are decent, reasonable people.

If any commenter knows of a trick to get around this, a gaggle of Google searchers will thank you for it.  Me?  I just uninstalled and reinstalled Unbox, and wrote a blog about it to pass the time while I waited for the install to download & finish.

Bill Uncategorized , ,

Set/Increase Memory Available in Rubymine

July 3rd, 2009

I did not find anything to love about the results I was getting searching for queries like “Increase rubymine memory” and “set rubymine memory”. Here’s the location of the file that dictates Rubymine memory usage in my Ubuntu install:

[RUBYMINE_DIRECTORY]/bin/rubymine.vmoptions

Inside you can specify lines like:

-Xms800m
-Xmx1200m
-XX:MaxPermSize=1000m
-ea

These declare maximum memory usage, maximum sustained memory usage, and, uh, some other stuff.

[Hops onto soapbox]
I love Rubymine, but I sometimes wish that instead of adding a ridiculous number of new features, they’d just make the damn thing run consistently fast, and not make me worry about memory usage. I know that with my web site I always have a preference toward adding cool new stuff, but responsible thing to do is often to perfect the pieces that are already there. Almost everything negative I’ve heard about Rubymine (which isn’t all that much) is along this same vein, but I’ve never heard the Rubymine team admit that it wishes that the product ran faster or its memory management were better.
[Hops back down]

For my money, still definitely the best choice for Linux IDEs.

Bill Uncategorized