Tag Archives: Ruby on Rails

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

Posted in Ruby on Rails | Tagged , , | 1 Comment

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

Posted in Ruby on Rails | Tagged , | 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

Posted in Ruby on Rails | Tagged | Leave a comment

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

Posted in Ruby on Rails | Tagged , , | 4 Comments

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

Posted in Ruby on Rails | Tagged , , , | 5 Comments

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

Posted in Ruby on Rails, VPS | Tagged , , , | Leave a comment

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

Posted in Ruby on Rails | Tagged , , , | 3 Comments

Plesk, Passenger (mod_rails), Ruby Enterprise Edition & Ruby on Rails

Currently I have a Plesk 8.4 installation running on a CentOS 5 VPS. First I had my Ruby on Rails websites running on multiple mongrel servers (cluster) but it took too much RAM of my VPS and it was very … Continue reading

Posted in Plesk, Ruby on Rails, VPS | Tagged , , , , , , | 9 Comments