A little more open source: a personal accounting software
Today I published on GitHub a software I developed for personal accounting I use for a long time. It may help some of you with custom view, table views and probably Core Data, or provide a fundation if you want to build such software. It’s available on GitHub ! Enjoy
nginx reverse-proxying unicorn
After the experiments detailed in my last post, I faced today the need to have clean ruby/gems environments for each project I deploy on my Amazon EC2 server. Just like on my development machine, I wish to use <code>rvm</code> to make a separate gemset for each application.
However, to be able to run each app in its own environment, using a dedicated ruby-server instance is needed. Like described in my previous post, I was using Passenger to do that. Trying to deploy a ruby-1.9.2 / rails 3.1 app, I could not get Passenger Standalone installed due to some rake > 0.9.0 incompatibilities. This required to get the last version of the Passenger gem on GitHub, what I can’t do with my current knowledge.
Since I was using Passenger to make deployment easier, I was wondering if it was still the case. And I was feeling like it was getting a very big machine running for each app, while there was surely other solutions. And sure there is! There are other ruby production-class servers which can be used: Thin, Unicorn, and surely many others. And since I’m reverse-proxying through nginx, I can use any of them.
So, from now, I’ll be using Unicorn. It’s much more easy to get it running, no need to have a complex and hazardous installation process, just add it to the Gemfile, bundle install and get it running. I think it will do the trick for now.
Reunionite is now opensource on GitHub if you need some material to start building an iPhone app!
Find it there: https://github.com/rchampourlier/Reunionite
More info on the app here! And you can get it on the AppStore too…
Feel free to contact me if you need some info, I was in a hurry when developing so there is not much documentation
nginx + Rails (through Passenger) on different Rubies + PHP, all this on Amazon AWS
Hi everybody!
It’s been quite a long time since my last post… I have lots to do, I’m working on a startup project and I’ve now another blog on which I have to write. I do not spend so much time developing, and almost not any more for Cocoa…
Due to my project I’ve been switching to web application technologies, and since I’m looking in the startup ecosystem, I’ve been looking at Ruby On Rails. After having played a little with Heroku, I wanted to start with a more customized hosting experience, so I’m now testing Amazon AWS service, through their free 1-year tier (allowing a sufficient cloud hosting for my purpose).
However, since I found the road quite long to reach a working config (I’m really newbie as sysadmin), I put all the things I went through on an Evernote page, and now I’m sharing them with you. It’s raw, I’ll try to refine all this with the time, but it may help nonetheless. And feel free to ask for help, I’ll do what I can
A great article to have a better understanding of Javascript’s prototype
The concept of prototype, the variables involved, the meaning depending on the browser and the use in inheritance: a great article, clarifying the thing out in a nice way!
https://javascriptweblog.wordpress.com/2010/06/07/understanding-javascript-prototypes/
Snow Leopard, 64bits, Ruby and MySQL
I recently started again wanting to play a little bit with the so acclaimed Ruby on Rails framework. Being on a Mac, I had not much to do to start working, with Ruby & RoR already installed with my Snow Leopard default OS X install (maybe because I’ve already installed the XCode Developer package, as well as the iPhone’s one… maybe you should check). So I was playing with my Ruby on Rails’ guide and I had already started building a project, having it displayed in my browser, so I knew the core of the install was up and ready.
Next step was to connect with MySQL. It proved not to be so simple as expected… Running rake db:migrate to check Ruby was well connected with MySQL lead to the following errors (both errors came repeatedly during my way to the solution, given below…):
- uninitialized constant MysqlCompat::MysqlRes
- dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
mysql.bundle
After some research and tests following different articles on the net, I finally got with a working solution (however please notice that it applies to an Intel Mac with 64bits processor under Snow Leopard):
- Install the latest x86_64 MySQL release (currently the mysql-5.1.53-osx10.6-x86_64). Several articles on the net will tell you the problems are due to the 64 bits version, you should install the 32 bits one, and so on. In my case, I tried both and it worked with the 64 bits one.
- Make it work! Check the install documentation, connect with mysql, start the server… to be sure everything is working. A good thing would be to be able to connect to it with phpMyAdmin for example (which I did).
- If you had already install the mysql gem (which you should have to need this page because you must have faced the previously mentioned issues…), uninstall it with
sudo gem uninstall mysql. - The trick is then to reinstall it with the following command line:
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_configwhich ensures the gem is installed for the 64bits architecture, matching the MySQL one.
Then, you should not face the previous problem any more, maybe some access denials due to misconfiguration in your RoR’s project “database.yml” file or your MySQL configuration. But the Ruby/MySQL connection should be OK!
Reunionite for iPhone available on the AppStore!
Check and share with your friends your meeting costs with this free app for your iPhone.
Watch the demonstration video • Get it in the iPhone AppStore.
Fix Apple aluminium ultraflat keyboard
I have had a little issue with my Apple aluminium ultraflat keyboard: I used some cleaning foam to make it shine, and there must have been more liquid than foam on my tissue… and some must have gone to the ‘L’ key…
I faced the following issue after plugging my keyboard back: the ‘L’ key was acting like it was pushed, so as soon as the keyboard was plugged it started typing llllllllllllllllllllllllllllllll… and so on. Typing another key stopped it, but then no way to make the ‘L’ key work anymore.
After having tried to blow on the unmounted key, unmount the mechanism, have some water on it, nothing made it, it was still not working. Finally, I ended up sinking the whole keyboard in water, leaving it there for approx. 2 hours, hoping the product would be gone. After 1 week drying quietly not far from the heater, it was working again as before!
Since during my first repairing trial I kind of broke some part of the mechanism, I had to exchange two keys (my broken ‘L’ with the never-used-number-pad-lock-key). To prevent this, please find a video (sorry voice and subtitles are in French) explaining how to unmount the key and the mechanism without broking it.
Retain your IB objects in Cocoa Touch
I previously published 2 articles on the fact that you had to retain your objects instantied from Interface Builder. I finally discovered the scientific explanation within an AdMob source file:
Note that top level objects in nibs other than MainWindow.xib in Cocoa Touch are autoreleased, not retained like in OS X. Be sure to use [self retain] in -awakeFromNib when part of a custom nib (as in this example).
Extract from the AdMob SDK source files for iOS.
Automatically restart an app having started a call?
This post will be quite simple. Its goal is to answer this question : is there a way to automatically restart an app which has initiated a call, once this call ended? This question is pretty related to my own apps (I hope you already know them! if not, just check them in the AppStore! most are free!), since these are phone shortcuts (naturally just a little advertising picture below…).
So I recently checked to determine if I may make my apps a little more better, by allowing the user to have them restarting after the call ended. And the answer is… yes… but… this involves doing something which is not really nice in my case. In fact you can do this through using a WebKit view, and having a phone URL displayed in it. Having the user clicking this URL will bring a confirmation alert, if the user goes on the call takes place, and once it finished the app is restarted (you can Google this to find more details, I will not since I did not use this trick, doesn’t match my user experience goal!).
And that’s all! There is no other way, so if you don’t rely on a click on a link to start a call, do not hope to have your app restarting. iOS is not doing this… anymore (I remember it did in its first versions… it’s a shame it’s not customizable).
Have fun!

