February 25, 2012

Using foreman and supervisord for process monitoring

note: this post was updated on 05.03.2012 to reflect changes made to supervisord support. When I’m developing a Ruby on Rails application I like having my external services configured inside my SCM. This eases the burden of documenting what must be executed in order to have a fully running application. It also helps deploying the application to the production- or staging environment since foreman supports exporting to process monitoring tools like upstart. Read more

January 30, 2012

handlebars routes assets has been renamed!

I renamed my Rails asset-pipeline routing integration gem to asset_pipeline_routes, after merging changes from @ubermajestix. You can find it on https://github.com/nicolai86/asset_pipeline_routes or https://rubygems.org/gems/asset_pipeline_routes. Besides renaming the gem I also took my time to add some small changes: asset_pipeline_routes requires Rails v 3.2.0 or greater all generated methods now take a parameter which is used to generate the resulting route. E.g. given resources :users in your routes.rb Read more

December 24, 2011

Everybody! Merry Christmas 2011!

So, it’s been more than a year since I started this blog. And it’s been a really nice year for me! But lets start at the beginning: Merry Christmas everyone! I really hope you can enjoy this years X-mas. Now, what happened last year? Here’s a short recap, in no particular order: Since September 1st I’m employed at Weluse GmbH. The last three months have been really nice and I really enjoy working there. Read more

November 3, 2011

Deploying hubot with capistrano and forever

Just recently github released their hubot into the wild. Hubot really is a nice piece of software. There’s even a really easy way to deploy it to Heroku. But wait… what if you want to deploy to your own server? Here’s one way using capistrano & forever. But first: a complete capistrano example: set :application, "hubot" set :scm, :git set :ssh_options, { forward_agent: true } set :branch, "master" set :deploy_to, "/home/hubot" set :deploy_via, :remote_cache set :repository, "git@your-server. Read more

October 30, 2011

Migrating Monolith Rails 2.x Apps to Rails 3.1: setting up rubycas-server

I’m planning on publishing a series of posts about how to properly set-up a working Single-Sign-On server and integrating it with Rails 2.3 Apps as well as Rails 3.1 Apps. My goal is to show you how to migrate a huge “old” Rails 2.3 Apps into multiple new & smaller Rails 3.1 Apps. For some time, these new Apps will coexist with the old system, until the old App is replaced in its entirety by new Apps. Read more

October 6, 2011

Asset Pipeline and I18n using jQuery-localize

After last months Frozenrails conference I tried to replicate the goals of Jeff Casimirs “Blow Up Your Views” talk using the Rails Asset Pipeline. The first step was using HAML and Handlebars in the asset pipeline to have most ActionView Helpers at your disposal. There was only one problem I did not address at all in my last post, localization. At work I talked a lot with Marc Schwering (@dgAlien) about this; separating views, data-models and localization looks like a good solution to us. Read more

September 21, 2011

Rails 3.1 Asset Pipeline and JavaScript Templates

Backbone.JS on Rails 3.1 asset pipeline Today I want to share a small proof of concept with you, taken from Jeff Casimirs talk at Frozenrails 2011: complete decoupling of controllers and views in Rails. So all the controllers do is to serve and consume JSON data. The front-end is build around this data. Now you might ask: “Why should I want to do THAT?”. For one, the way view rendering currently works in Rails isn’t very object-oriented. Read more

August 19, 2011

building JavaScript mashups

Adding browser-independent features to websites ‘you did not build’ is possible - the only drawback is that the user must willingly choose to enable your mashup. Here’s one way to do it: develop a small mashup - whatever you want to build, minify it and wrap it in a closure like this: All this example does is to alert “Hello World” on the page it is executed on. Read more

July 19, 2011

Debugging WebSQL databases in Google Chrome

Debugging WebSQL databases in Google Chrome is straight forward, right? Just open up the developer tools (⌘ + ⇧ + I) go to the Resources Tab and select Databases. You can poke through the WebSQL databases of the current website there. But this won’t work if you are trying to inspect WebSQL Databases which have been created by a WebWorker! They just won’t show up in the Databases Tab. Luckily you can work around this problem easily: Chrome stores all WebSQL Databases locally on a per-domain basis at ~/Library/Application Support/Google/Chrome/Default/databases. Read more

May 26, 2011

Ruby on Rails and PDFKit

Disclaimer: this is a really passionate post about PDF generation in Ruby on Rails If you ever tried to generate PDFs in one of your Ruby on Rails projects you probably know plenty different ways to get PDFs out of your Ruby on Rails app: Prawn, Apache FOP, iText et cetera. I’ve worked with Prawn, Apache FOP and iText - all these solutions are completly impractical. Here is why: Prawn: for me, the Prawn DSL doesn’t work well with separation of concern: if you don’t watch out you’ll end up mixing your style- and layout code. Read more

© Raphael Randschau 2010 - 2022 | Impressum