Monday, June 30, 2014

Getting Started with Node.js on Heroku ...

... is not easy on Windows.  This Guide is a good one.  The steps are clear with right amount of details.  I just couldn't get through it on Windows 7.  First I couldn't verify my app with foreman.  I got "Bad file descriptor".  After tinkering with Foreman versions a bit to no avail, I decided to go ahead deploy it, thinking maybe it's just foreman.  That didn't go either.  I just kept getting "Permission denied (publickey)" with git push, even after checking and rechecking I have the keys and they're added to Heroku (key addition notification from it as proof).

So I did anyone reasonable would do under such circumstances.  I switched to Linux.  I was able to have the app running on a dyno within 20 minutes on a Precise (12.04.4), including the time needed to set up a build environment and make the Heroku client - it's a VM I don't usually use to build stuff.  What can I say?  Next year I'm building a Ubuntu laptop (or getting a Mac).

UPDATE: I had a chance to ask Jay Hurst from Salesforce about the troubles on Windows.  He mentioned that the problem with foreman may be related to the fact that the utility is looking for a particular kind of shell.  He suggested trying the bash installed by Git on Windows.  For the key troubles?  "You could have key problems on any platform. "  :-)

Thursday, June 19, 2014

Why did Eclipse push 4.4.0RC3 to installations?

Don't fix it if it ain't broken.

I should have thought about that when I saw an Eclipse update (turns out to be 4.4.0RC3) coming up when looking for a Force.com IDE upgrade.  But I didn't.  I went ahead with the installation.  That's probably the old system admin version of me - always get the latest version!

Eclipse wouldn't launch, complaining about JVM 1.7 as required.  Fine, I installed Java 7.  It launched then, but I was greeted with a blank package explorer (after upgrading the workspace).  Looks like the new version doesn't work with Force.com v29.

My mistake for trusting it aside, why would Eclipse push out a RC version?  In the past I never had issues with Eclipse updates.

So stick with your original Luna - it worked fine for me.  Just be prepared to reject any update they might put out there.

Monday, June 2, 2014

How to register a custom domain for Sites

Just noticed (thanks to Jason and Kara!) that since Winter '14 the setup needed to register a custom domain to use with Force.com Sites has changed.  Here's the instructions on the setup page (will show the actual org Id):

A new or renamed domain will be permitted if any of the following criteria is true. Note that 00d7************** is your organization's unique API identifier in lower-case characters.

  • Your domain name is a CNAME record that points to [domain].00d7**************.live.siteforce.com.
    • As an example, if you are adding www.example.com, it must be a CNAME record that points to www.example.com.00d7**************.live.siteforce.com.Note that your domain will need to be a CNAME record for Salesforce to serve your domain.
  • Your domain name has a TXT record that equals 00d7************** with no punctuation.
  • Your domain name is a subdomain of an another domain in your organization.


There's a recipe in the Force.com Cookbook that really needs to be updated, but I couldn't even add a comment to suggest that (errored out each time I tried)...