From Developer

Bundling rails apps on managed server

On a managed server where you do not have root access, but still would like to install some gems manually, you can install them locally – as in install them in your own user directory.

This can easily be done with the following command:
gem install somegem -v'1.2.3' -i ~/mygems

Then, the newly installed gems (now reciding in ~/mygems/cache) may be copied to the vendor/cache folder of your rails app:

cd ~/path/to/rails/app
cp ~/mygems/cache/* vendor/cache/
bundle install --local

Why am I writing this? Because the last time my hosting provider updated the FreeBSD OS, I could not simply run bundle install, Instead I had to fetch some specific version of libv8 to get it all to work. There may be other ways – but this is what I found to work in my case.

Another note to self: The RubyRacer is quite stubborn with dependencies. You may want to try bundle update libv8 before going crazy with other stuff ūüôā

Danish and other special characters with Ubuntu Linux on MacBook Pro

For a while I’ve been using Ubuntu Linux on my MacBook Pro. As a developer, or just someone who likes to be able to use standard keyboard commands in many applications, I find it convenient to use the English¬†keyboard layout, even though the keyboard is fact Danish.

So, until nowm I had to switch between Danish and English keyboard when ever I wanted to use Danish special characters, √Ü, √ė and √Ö. While it is indeed very easy to switch keyboards in Ubuntu, it kept confusing me because I would often forget which layout I was currently using, so I wanted to find a way to map some special typing to those Danish characters.

And today I found an article that describes a way, right here:

There are few things to add to this, and again, this guide is specifically for MacBook (Pro) running Ubuntu Linux using English keyboard layout, although it may also work for others.

  1. Open the keyboard configuration (cmd, then ‘keyboard’, then enter)
  2. Choose ‘Typing’ in the left pane
  3. Select a compose key (I chose ‘Right Win’ which is the cmd key to the right of the space bar)

You are now ready to type Danish characters according like this:

√¶: Press and hold the compose key, then type ‘a’ (you can release the compose key now or keep it down) followed by ‘e’

√ł:¬†Same as above, just using the keys ‘/’ and ‘o’

√•: Same as above, just using ‘a’ and then ‘a’ again

√Ü:¬†Press and hold Shift in addition to the compose key, then type ‘a’ followed by ‘e’¬†(keep Shift¬†pressed. Compose key may be released after typing ‘a’)

√ė: Press and hold the compose key, then type ‘/’. You may now release the compose key, but you can also keep it pressed. Then type ‘O’ (capital because of pressed Shift key)

√Ö:¬†Press and hold Shift in addition to the compose key, then type ‘a’. followed by ‘a’ again (keep Shift¬†pressed. Compose key may be released after typing ‘a’).

New job in Peytz Mail

This summer I turned my office-chair around to work in another department here at Peytz & Co – more specifically the Mail team. Here we are developing a very advanced platform for composing and sending out newsletters. The product is being used by prominent and demanding clients including Politiken, DR, FOA, Bonnier Publications, Beoplay, Storebaelt, TV2, 3F and many others, and is built in Ruby On Rails – a web application framework I’ve also been using for some of my own projects.

Developer / Team Tech Lead @ Peytz & Co

Since July 2016 I have been working at Peytz & Co, a company well-known for their excellent CMS-sites and various digital communication courses. What they also have is an applications team, and this is where I fit in. I was quickly assigned two very different but very interesting projects. First up was the Danish Red Cross who needed to have their system for the annual collections moved from an old platform to a new one. This was made with the PHP Symfony framework.

The next project was for¬†TV2 and Metronome Productions¬†– they needed a solution that would enable them to interact with over 200.000 viewers at once during their show known as ‘Fuld Plade‘, so we¬†came up with a solution that involved a web application written in Go using NSQ queuing and Redis to ensure maximum performance. The solution also included a backend web application¬†made with Symfony and an additional login server that would take some of the load off of the TV2 login system.