Author: anthony

Rails remote multipart form with remotipart bind ajax:success

Rails 3.x / 4.0 does not handle remote multipart forms natively, so a workaround is needed. To get remote multipart forms working correctly you can use the following steps (quick solution). First: Add the remotipart gem to your GemFile gem ‘remotipart’, ‘~> 1.2.1’ Then, Update your javascript manifest file (in basic configurations this is usually […]

Bootstrap Modal – load remote url multiple times

If you’re using Bootstrap 3.x to generate a remote link based modal, you’ll notice that re-clicking the same link does not re-request the content of the remote URL and instead just re-displays the same content from the previous load. This isn’t a great result in many cases (forms for new objects for instance). To resolve […]

VirtualBox resizing vmdk to increase dev/mapper partition

If you’ve run out of space on a VirtualBox vmdk drive and want to increase the partition’s size, do the following: 1) Download the GParted ISO from their website. 2) Convert your vmdk to a vdi (VBoxManage can be found in your virtualbox “program files” directory. Use explicit file paths if needed) >> VBoxManage clonehd […]

JQuery Sortable with multiple sections within the same view

I ran into an issue the other day where multiple sortable regions were dynamically created within the same view, all with the same class structure. After running > $(“.the-class”).sortable({…}) I noticed that only the first sortable region was actually sorting. To resolve this issue iterate over the class and call sortable on each individual element. […]

Rails 4 TurboLinks with JQuery document ready

Using JQuery’s $(document).ready() functionality seems to be broken when using’s the Rails Gem Turbolinks. However, to fix any issues you are experiencing, add the jquery-turbolinks gem to your Gemfile > gem ‘jquery-turbolinks’ Then, add the following line to your JS manifest file, typically application.js in your assets directory: //= require jquery.turbolinks After which, restart your […]

Rails Capistrano deployment: SSH, Error reading response length from authentication socket

If you’re running a rails application with capistrano and you run into the following error: Error reading response length from authentication socket When you attempt to connect via cap, for instance > cap staging deploy Then make sure you can answer the following questions with a ‘yes’ before continuing. 1) Is my private key properly […]