Chris Blunt

Hi, I'm Chris.

I'm a software developer and consultant based in Plymouth, UK. This site is a collection of tutorials, thoughts and things I've learned in code, life and running my business.

Today, I help people and organisations who use Ruby on Rails. I enjoy learning and experimenting with tools and technologies, as well as the art of business. This means I'm often dabbling with new languages and frameworks, and posting what I learn. My now page describes what currently has my attention.

You can follow and contact me on GitHub icon github Instagram icon instagram LinkedIn icon linkedin psw-logo-mark-transparent Created with Sketch. plymouthsoftware

Rails on Docker: Getting Started with Docker and Ruby on Rails

Updates 3 December 2018: Use ruby:2.5-alpine Docker images. Continue reading →

Posted in rails, ruby, docker.

How to Fix Missing SD Card on Android Emulator

Whilst testing an app on the Jelly Bean emulator, I couldn’t get the emulator to mount the SD card. Calls to Environment.getExternalStorageState() would always return Environment.MEDIA_REMOVED. Continue reading →

Posted in tips, android, emulator.

How to Pass Data From Rails to Javascript / Coffeescript

If you want to pass data between Rails and Coffeescript in your apps, you’ll find that interpolation doesn’t work. For example: Continue reading →

Posted in rails, ruby, coffeescript.

3 Ways to Keep Your Ruby on Rails Apps Healthy

Ruby on Rails is a great framework for building modern web applications. But as with any technology, things move on quickly. Without proper care and attention, the web apps and sites you build using Rails can start to degrade. This means slow pages, security vulnerabilities and your users seeing error screens. Continue reading →

Posted in rails, ruby.

Rails on Docker: Quickly Create or Update Your Gemfile.lock

As I migrate all of my Rails apps to Docker, I’ve learned to avoid making changes to the Gemfile whenever possible. Continue reading →

Posted in rails, docker, bundler.

Rails: Generating Polymorphic URLs when Model name does not match Route

Given a slugged generic model for which you want to generate a URL at runtime, you can usually just call: Continue reading →

Posted in rails, howto, programming.

Android: Toggling Your App's Theme

Update 24 February 2016: The Android Support library now includes a Theme.AppCompat.DayNight theme which bundles this feature for free. See the Android Developer Blog post for details. Continue reading →

Posted in howto, programming, android.

Using TinyMCE Content CSS with Rails Asset Pipeline

Recently, whilst building a small CMS system using TinyMCE and the tinymce-rails gem, I needed to inject some custom CSS so that the editor’s styles matched those of the site. Continue reading →

Posted in rails, howto, programming.

Rails: Rendering Dynamic SVG Images in respond_to

SVG is a vector image described in XML. This post shows how to to render SVG images inline with Rails. Continue reading →

Posted in rails, howto, programming.

Android: Consuming a Remote JSON API with Volley

Update 12 September, 2017: This continues to be one of my most popular posts, but the code was outdated. This updated version includes instructions for modern versions of Android, Android Studio, and dependencies such as Volley. Continue reading →

Posted in howto, programming, android.