Suddenly I lost the styling on my application served on Heroku. The reason for that was that all the assets (CSS, JavaScript, images) could not be found. The mysterious error:

ActionController::RoutingError (No route matches "/stylesheets/basic.css" with {:method=>:get}):

was indicating that there is some routing problem. Actually it wasn't that exactly. I have added to my application config.ru file which I needed for serving it from Pow in my local development environment. The Momoro Hoax provided a solution which was to change slightly the content of the config.ru. Of course removing config.ru from that app and not keeping it in git repository would also solve that problem. 
 
Across my, so called, career, I was working in different environments: small companies, big corporations, medium company going small, small company going global, a consultancy in corp culture trying to be agile, an agile small company falling into the corp culture. I also worked with different technologies, those which came from such ones like: M$, IBM, Oracle, SAP, and those which used to be ignored by big boys: Open Source, Apple, Web Standards, Ruby on Rails. I went through many project management styles, from "project life cycle" lectured and exercised at Uni, email, meetings and phone calls driven chaos, Agile techniques which looked a bit fanatic, waterfall, thick book formal specification prepared by BAs, extremely fast craziness, through online project management tools like Basecamp, Jira, self written one. 

Today I already know what kind of working culture makes my day. 37Signals proved that you can do less to make it better. They also proved that people can be happy at work. Fog Creek created a great office as they think it is a key thing to have a great working environment for creative programming.

When looking back at technologies, they reflect the culture of those who create them. Jira is messy, cluttered, confusing, even people who insisted on using it by me, they just don't use it. Why? Maybe it is not comfortable to be used? David Allen in his "Getting Things Done" book explained that we need to organise ourselves in a way that "filing stuff has to be fun, so we could do it with pleasure". Some working cultures, like corp one, claim that work doesn't have to be fun, it is just work and you should just do it because they pay you for it. Such culture is a common perception. When I openly speak to people who are close to me that it doesn't have to be like that, they look at me in a funny way. But some say: "And the only way to do a great work is to love what you do [...] so keep looking, don't settle"

I kept looking and I found: Web Standards when I could not stand the pain of developing web sites for IE which then should also look good in other popular browsers, which at the time was only IE in different versions and then a bit of FireFox. Web Standards with Jeffrey Zeldman shown that we can do it in a better way, do it according to standards so it displays well everywhere and then we have a pain of developing for IE. Ruby on Rails with respect for Web Standards made programming a pleasure. Those who laughed at first at "framework that's optimized for programmer happiness and sustainable productivity" are trying to replicate that within their environments: Java, .Net, PHP etc. I decided 5 years ago to take a risk and follow the happy route and switch from .Net to Ruby on Rails. Even if it meant to deal with lack of backwards compatibility which is soooo important for Java developers or for Windows. I prefer using better OS which leaves behind things which did not really work out, even if it means I would need to spend more money for newer computer. That's why I use Mac OS X. I don't mind if new Basecamp is actually a new product with many things dropped from the Basecamp Classic, if that means a better approach to project management. I'm fine with big changes between different versions of Ruby on Rails even if I have many projects in so many different Ruby on Rails versions. Because I can see how good choices have been made by Open Source community. Even if those choices might be judged as not the best ones one day, we all know it can be changed with new, better choices, because backwards compatibility or corp culture won't stop us from that.

These days banks are looking for Ruby on Rails developers and they pay good money. More important though is how great web applications are being created. Many of them built on that framework, others using Ruby on Rails approach within other frameworks. I don't mind if there are many project management tools around (Basecamp, Trello, Asana, Jira, Codebase). I will try to use the new Basecamp. I trust the people from 37Signals. I don't need to use the best one. The great one is enough for me. 

 
I'm not writing anything anymore directly in Weebly which just decided to reload the interface while I was writing. Bad habit to use a web app for creating content. Stickies (an old Apple app) are perfect, they keep recording what you write instantly.

 
These days Xcode is getting installed directly from Mac App Store. For installation of Ruby on Mac OS X we need a C compiler. It used to be installed with Xcode in previous versions. In Xcode 4.3 that needs to be installed from Preferences of Xcode in the Downloads section, the "Command Line Tools" bit. When you click [Install] button you will be asked for your Apple Developer ID you have registered with as Apple Developer. I have put a wrong AppleID and I could not find where to change it in Xcode preferences. But because Xcode asked me if I want to store this information in my Keychain, I could find that in the keychain under daw2.apple.com name. This way Xcode will ask for Apple Developer ID again.

So far so good, the 171.7MB of Command Lind Tools are downloading, although the note under that installation explains that those are not really necessary:

Before installing, note that from within Terminal you can use the XCRUN tool to launch compilers and other tools embedded within the Xcode application. Use the XCODE-SELECT tool to define which version of Xcode is active.  Type "man xcrun" from within Terminal to find out more.

Downloading this package will install copies of the core command line tools and system headers into system folders, including the LLVM compiler, linker, and build tools.


If you want to use the compiler without installing the "Command Line Tools" you need first to set the path to Xcode. Run that as super user:  
> sudo xcode-select -switch /Applications/Xcode.app/
This way you can find where is the compiler:  
> xcrun -find cc  
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
> xcrun -find gcc  /Applications/Xcode.app/Contents/Developer/usr/bin/gcc

All the above came from that I wanted to install Ruby 1.9.3 on Mac OS X 10.7.3 Lion using rvm:
> rvm install 1.9.3
The above command will fail as it needs to use another compiler. Thanks to zzaman who answered to similar problem on Stack Overflow I have specified the compiler, which works:
> rvm install 1.9.3 --with-gcc=clang



Now I have 1.9.3-p0 under rvm 1.10.2 and another problem. Setting a default gemset is not working. 
> rvm use 1.9.3@3.2 --default

But with help from ashleyconnor the suggestion to get the head version of rvm helped. Now with rvm 1.10.3 the default gemset is working. This resulted also in getting Ruby 1.9.3-p125. Here we are with:
> ruby -v
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]
> rails -v
Rails 3.2.2

 
According to Apple's technical specification for that MacBook it can support up to 4GB. I looked at Crucial where I like to buy RAM and their search tool guided me to a DDR2 PC-5300 667MHz 4GB Kit. I have learned already that this search tool not always shows correctly, so I checked on System Profiler of the MacBook in question. The current 2GB RAM there was 2x 1GB DDR3 1067MHz. Exactly the same memory as I have in MacBook Pro 15-inch,  2.53GHz, Mid 2009, except I have there 8GB (2x 4GB). 

I've taken that 8GB out of MacBook Pro and put into the White MacBook. Works perfectly fine. So I have ordered for the White MacBook 8GB Kit (4GBx2) DDR3 PC3-8500, which works. 

Crucial should correct their search tool.
 
It happens that I am using 2 different keyboard layouts. My login password falls into different keys into the physical keyboard depending on which keyboard layout is selected. Switching between those keyboard layouts on the login screen or whenever you need to put your password in, is not a problem. But when one of the layouts is shown on the login screen you would expect that this layout is selected, right? Well, in Mac OS X Lion 10.7.3 it isn't. It shows British keyboard layout selected while actually the Polish one is active.
 
I'm sure I will have more adjustments to do, the first one I noticed I need were the colours when ssh'd to external server. In Mac OS Snow Leopard they were nice, now they were gone. Thanks to Henry's tip how to fix it, I have them back. I'm using 2 colour schemes in Terminal, so the setting for "declaring terminal as 'xterm-color'" had to be set in both.
 
All was looking good until I installed 1.0TB WD10JPVT inside my MacBook Pro. The specification did not indicate anything apart from Advanced Format. But as long as it worked via USB2.0 when docked in "All in 1 HDD Docking", I naively thought it will be just fine when connected via SATA inside the MacBook Pro. 

MacBook saw this hard drive as 125GB one, 8x less than 1.0TB, which would indicate there is a problem with the Advanced Format. When I put that HDD into a WD external enclosure it was the same, wether via USB2.0 or FW800, still the 1.0TB GUID Partition Table (GPT) wasn't recognised and it was ready to format it in 125GB claiming that Partition Table was "Master Boot Record".

I really like the way Lion works, so I will stick to it via that USB2.0, for now. Once I cloned that installation I am using for work, I will put that hard drive inside MacBook and I will try to format it again, but when it is plugged via SATA.


Edit: Final result of this exercise is that all is working fine now. The drive needed to be formatted when connected via SATA inside the MacBook Pro. Happy days.
 
After many months of postponing the upgrade from Snow Leopard to Lion, observing others using Lion, for office work and for web development work, finally I have decided to at least try the upgrade.

I've got myself a bigger HDD as the one in the laptop was already full. Friday night all the work for the week was finished, so if I could make it over the weekend and it worked, I could start on Monday working on Lion. The critical bit is to have the Ruby on Rails environment working. 

  1. I have cloned my disk with Carbon Copy Cloner into the new one. I left it over night, it took 5 hours for 300GB of data over USB.
  2. On Saturday morning I started installing Lion on the cloned drive. During the day I've run the Software Updates. At the evening I've logged into my account where I have the development set up. I checked if Pow was still running one of my applications locally. It didn't, but Webrick was enough and all rvm with different gem sets seemed to be fine. It was taking a while to convert emails (21GB) into the new Mail version. I left it overnight.
  3. Today morning I have looked into how the new Mail works. Finally I can read the email conversations normally. The Mail is splitting quoted parts of emails into separated emails within conversation and allows sorting it from oldest to newest and the other way round. I can now see the response under the quoted email even if the whole world is doing it in corporation style with responding above. Well done Apple!
  4. Suddenly Pow is working, no problem. I did not have to reinstall anything from my development workshop. I have decided to call it a day. I'm switching my work environment to Lion. 


Now onto swapping the drive inside the MacBook Pro...
 
I was just invited to use LastPass so some shared passwords could be used by me for testing web apps implementations. 

First thought: "What? Why would I ever allow some third party plugin to get on my browser and take control over my passwords?"

Second thought: "Some wise professionals suggested it is a good idea, I should look into it."

I have installed the plugin in a kind of isolation mode (I don't use FireFox for other things than testing, so I could use that).

Third thought: "What an ugly and unfriendly user interface?!"

The password got shared with me, I received it via LastPass plugin in FireFox. It worked to access the web app I was about to test. I thought I would have a look at that password. The user who shared it blocked it from viewing it: "This is a shared site. You are not permitted to view the password." Kind of good idea. But...

Next thought: "Once something is in my browser put into a form field it means it gets send out to the web, hence I should be able to see it if I want, because it is just there!"

Guess what. A small javascript in Firebug Console and the hidden password was no longer hidden. Actually, when I think about it now, no javascript needed at all, just changing in the inspector the type of the input from password to text and here we are, the dots covering the password are swapped into whatever password that was.

So much to block viewing shared passwords.

Anyway, thought after thought I proved to myself that using any third party SaaS for sharing, keeping passwords is a NO.