Running into this error when trying to watch Amazon on Demand on Ubuntu? An error occurred and your player could not be updated. This is likely because your Flash Player or Browser needs to be updated. This update is required to play back this video. You’re not alone.  To get Amazon on Demand to work with Ubuntu 13+, close your Firefox browser, then run the following commands and restart firefox: [...]
Read More
If you have an ordering default scope that you’d like to override with a different ordering, you can do the following: Change the order() method to .reorder() This will remove all pre-existing default scope orderings and replace them with the argument found within the reorder request.
Read More
If you’ve recently loaded a new Rails 4 application to Heroku and your assets are missing (css, js, etc) – you’re not alone. Add the following lines to your production.rb (or staging.rb) environment configuration files: config.serve_static_assets = true config.assets.compile = true Then push the changes up to Heroku and you’re good to go.
Read More
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 found in assets/javascript/application.js). Include the following requirement: //= require jquery.remotipart In my case, I’m binding [...]
Read More
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 this issue do the following: $(document).ready(function(){ $('body').on('hidden.bs.modal', '.modal', function () { $(this).removeData('bs.modal'); }); }); This [...]
Read More
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 “source.vmdk” “cloned.vdi” –format vdi 3) Resize the vdi to whatever size you need (units in [...]
Read More
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. For instance: $(“.the-class”).each(function(){ $(this).sortable({…}); });
Read More
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 server, and you should be good to go.
Read More
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 created and available on my local system. Simple configurations will generally maintain the key at: [...]
Read More