Categories
-
Recent Posts
Archives
Author Archives: Tom
Why is my KmlLayer in Google Maps v3 not working?
If you use some code like this: <script type="text/javascript"> function initialize() { var options = { mapTypeId: google.maps.MapTypeId.SATELLITE, streetViewControl: true }; var map = new google.maps.Map(document.getElementById('map'), options); var kmlLayer = new google.maps.KmlLayer('http://127.0.0.1:3000/kmlfile.kml'); kmlLayer.setMap(map); } function loadScript() { var script = … Continue reading
Force file_column to regenerate the thumbnails
A small post to show how to let file_column to regenerate the already generated thumbnails. def update_attributes(att) self.path = File.new(self.path, "r") self.save super(att) end When you put this piece of code in the model where the file_column is used, the … Continue reading
VMware ESXi 4.0 + QNAP TS-410
I’ve updated my server setup at home with some new hardware. First of all a new QNAP TS-410 NAS with 4 Western Digital Caviar Green 2TB disks attached to the NAS. For my new server I will use an old … Continue reading
Posted in Storage, Virtualisation
Tagged ESXi, iSCSI, NAS, QNAP, Storage, TS-410, VMware
Leave a comment
Ruby on Rails MiniWiki plugin released
To create a wiki in a Ruby on Rails app, I’ve created a plugin called: MiniWiki. With 3 simple steps it is possible to add a very basic wiki to your application. The only dependency is RedCloth and the generator … Continue reading
SWFUpload direct to Amazon S3 in Ruby on Rails
I’m working on various projects and for one certain project this company wanted a file sharing website, like yousendit.com for example, but the site should be in-house. I proposed Amazon S3 for the storage of the files, otherwise the VPS … Continue reading
XEN, Ruby Enterprise Edition and 4gb seg fixup
My new CentOS XEN server has a virtual machine which serves as a dedicated web server. The on the console and in /var/log/messages the following message appeared: 4gb seg fixup, process ruby (pid 20252), cs:ip 73:00e0a636 printk: 151939 messages suppressed. … Continue reading
Capistrano and Passenger part 2
As Karl Varga pointed out in his comment on my previous post on Capistrano and Passenger (here) my apache rewrite rules did not send back the proper HTTP status codes. Now with the improved and tested rules the 503 status … Continue reading
Posted in Uncategorized
Leave a comment
Namespace route and form_for method
When you have a namespace in your routes.rb like this: map.namespace :admin do |admin| admin.resources :users end And you like to have a form like this: <% form_for(@user) do |f| %> <%= f.error_messages %> Change the form_for in this and … Continue reading
Gem 1.2.0 released
Yesterday gem 1.2.0 was released. This is a release we’ve all been waiting for! This version doesn’t have the ‘bulkupdate’ and doesn’t consume that much memory as before. So update your gem for the last time with the -B parameter. … Continue reading
Capistrano and Passenger
To use Capistrano on a Passenger enabled host, you need to add the following lines to your config/deploy.rb file. namespace :deploy do desc "Restarting mod_rails with restart.txt" task :restart, :roles => :app, :except => { :no_release => true } do … Continue reading