Quantcast
Channel: Lasse Bunk's weblog
Browsing latest articles
Browse All 14 View Live

Creating your own WordPress plugin database migration framework

So, how do you migrate changes to your database structure from one version to another (like you may know it from Ruby on Rails) when you are writing a WordPress plugin? Here’s one way to do it. Let’s...

View Article


Translate your Ruby on Rails YAML files using Bing

I have created a plugin named bing_translate_yaml that allows you to simply translate your Ruby on Rails YAML files into any language using Bing. The plugin takes your YAML files from the...

View Article


Translate your Ruby on Rails models and database tables using...

acts_as_translatable is a plugin for easy translation of your Ruby on Rails models and database tables. Installation In your Gemfile: gem 'acts_as_translatable' Install the new gem: bundle install...

View Article

Creating a public symlink using Capistrano

So, I have a folder containing static sitemap files for my site. These sitemaps are generated and saved in my public/sitemap folder. However, I want to keep these sitemap files between deployments....

View Article

Examples of Ruby on Rails

When I want to learn a new programming language or framework, I usually first try to find some examples to look at. Many times I have found it hard to find a single page with some good examples on how...

View Article


Image may be NSFW.
Clik here to view.

Sublime Text: Convert Ruby 1.8 to 1.9 style hash syntax

Ruby 1.9 and 2.0 has a new hash syntax. In Ruby 1.8 it was: hash = { :one => "first value", :two => "second value" } In Ruby 1.9 and 2.0, this can now be written as: hash = { one: "first value",...

View Article

Gracefully reindex Sunspot Solr without dropping indexes

If you’re using the Ruby on Rails Sunspot gem for searching your models, running rake sunspot:solr:reindex will drop your entire index before reindexing the models. If you want to reindex the models...

View Article

Image may be NSFW.
Clik here to view.

3 great books on usability and design

1. Don’t Make Me Think! by Steve Krug “I thought usability was the enemy of design until I read the first edition of this book. Don’t Make Me Think! showed me how to put myself in the position of the...

View Article


Image may be NSFW.
Clik here to view.

3 essential books for Ruby on Rails

If you want to get a good insight into Ruby and Rails, here are three good books that both give an introduction and insights into more advanced aspects of the language and framework. 1. Agile Web...

View Article


Fixing “You have already activated rake 10.1.0, but your Gemfile requires...

Just a quick note for searchers. Maybe you got this error: Gem::LoadError: You have already activated rake 10.1.0, but your Gemfile requires rake 10.0.0. Using bundle exec may solve this....

View Article
Browsing latest articles
Browse All 14 View Live