Bounga's Home

Setting up Rails, Nginx and Puma

in Unix
When Rails 4 was released it offered a bunch new features and deprecations :



You can see that thread safety is since on by default so a Rack server can safely create threads for your Rails app rather than forking process and waste cpu cycles and memory.

If you didn’t switch to a Rack compatib...

Read more...

Downgrading RubyMotion

in Tips
Sometimes after upgrading RubyMotion I face some bugs introduced in the new release. It can be bugs which can easily be workaround or really annoying bugs that will be pain in the ass in a daily work.

In this case most of the times I choose to downgrade RubyMotion rather than waiting for a new r...

Read more...

Loading shared library in Android using RubyMotion

in Ruby
Problem

Using a vendor library may require to load a shared library (a.k.a .so) along with it to make it work.

I faced this problem when I was trying to use Android PDFView which relies on VuDroid to display PDFs in an Android app.

At the beginning I just added the android-pdfview-1.0.2.jar fi...

Read more...

Force screen orientation in Android using RubyMotion

in Ruby
As you may know since a couple of month you can write native Android apps using RubyMotion.

Last weeks I used it to build an Android app and had the need to lock the screen is portrait mode.

Using the classical Java / XML toolchain to build an app, you have
to add an attribute to your activity ...

Read more...

Capistrano using Mercurial (a.k.a Hg)

in Ruby
As you may notice I’m a big fan of Mercurial which is a great DSCM a lot more easier to learn and use than Git in my opinion.

As a Rails developer, I like to use Capistrano to deploy my websites.

Most of Rails developers use Git because it is the de-facto DSCM to use with Rails since all projec...

Read more...