Blog - mainly technical Blog - mainly technical RSS feed

Technical posts to help us and others

 

The future of Mobile

Here is another good article on mobile internet traffic trends. This further highlights why new websites should be built to cater for mobile equally with PC's. http://www.businessinsider.com/the-future-of-mobile-deck-2012-3?utm_source=twbutton&utm_medium=social&utm_campaign=sai

read more »

 

Mobile design

We have been doing a lot of work on mobile web design lately. Actually it isn't mobile design as such but rather catering for a wide variety of devices and computers with the one design from the large desktop screens to your mobile phones. The technique is called responsive design and basically allows for the layout and behaviour to change ...

read more »

 

Rails 3, run passenger in development mode

To run rails 3 in devlopement mode use RackEnv development instead of RailsEnv development

read more »

 

Standing at office desk good for a change + might be very good for health

I have seen a few articles recently about the health risks of sitting still in office jobs. http://roomfordebate.blogs.nytimes.com/2010/04/23/is-all-that-sitting-really-killing-us/ http://www.businessinsider.com/more-terrifying-facts-thats-sitting-kills-you-2011-5?...... Of particular suprise was that even doing 30 mins exercise each d...

read more »

 

Cross browser CSS rounded corners on hover for IE

I have been trying out getting css rounded corners to work for IE 7 and 8 using http://fetchak.com/ie-css3/ If you are having trouble add the folowing styles: z-indexposition relative or position absolutezoom 1To work on hover for an "a" tag: I got it to work using javascript with a hover class instead of the standard css :hover styles....

read more »

 

autotest:19:in `load': no such file to load -- autotest (LoadError)

After upgrading ruby gems to verions 1.5.2 and then upgrading bundler Autotest no longer worked. Giving the following error. autotest:19:in `load': no such file to load -- autotest (LoadError) For the moment the only fix I could find is to dowgrade bundler and ruby gems again. If you know the ruby gems version you are downgrading to then thi...

read more »

 

Rails 3 lambda in scope "odd number list for Hash"

In Rails 3 using lambda in a scope only requires 1 set of curly brackets. eg. Rails 2.3.x named_scope :current_language, lambda { { :conditions => ["posts.language_id = ? ", @language.id] } } Rails 3 scope :current_language, lambda { where("posts.language_id = ? ", @language.id) }

read more »

 

Rails 3 - bundler: command not found: rspec

I am upgrading an app to Rails 3 and on to getting the rspec specs running. After installing the compatible verison of rspec and running bundle install etc. rake spec I get this bundler: command not found: rspec Install missing gem binaries with `bundle install` I am using Ruby Enterprise locally and there was a executable that was not being...

read more »

 

Rails 3 reload plugin or engine in development

If you have a plugin or engine that you would like to reload on each page call in development mode. In rails 2 this was done by: if RAILS_ENV == 'development' ActiveSupport::Dependencies.load_once_paths.reject!{|x| x =~ /^#{Regexp.escape(File.dirname(__FILE__))}/} end In rails 3 use: if RAILS_ENV == 'd...

read more »

 

ActiveRecord ruby Script without Rails

Below is an example script of how to use existing ActiveRecord Models in a rails app without loading the entire rails app. #!/usr/bin/env ruby require 'rubygems' require 'active_record' require 'yaml' RAILS_ROOT = File.join(File.expand_path(File.dirname(__FILE__)), '..') puts RAILS_ROOT dbconfig = YAML::load(File.open("#{RAILS_ROOT}/confi...

read more »