RailsCasts Pro episodes are now free!

Learn more or hide this

Reinier Korth's Profile

GitHub User: ReinierKorth

Comments by Reinier Korth


Did anyone ever figure out how to do this?


Thanks for the $(document).on("click","#game_classes th a, #game_classes .pagination a", function() line Mizpah :)


Never mind.

Had forgotten to run:

sudo update-rc.d -f unicorn_appname defaults


Did you find a solution for Unicorn not starting after a server reboot?

I have the same issue.


I have an issue that each time I close my browser, I get signed out from my website and have to log in again on revisit. I do keep signed in at facebook.com...

Anyone got any idea what is going on?


Ignore my post 2 posts up. Turned my config was working fine.. Didn't realize they weren't being updated with normal cap deploys so my server still had the old ones in etc/nginx/sites-enabled...


I've been struggling for a while now getting multiple apps online on one server so I hope someone can help me...

I've followed this tutorial to the letter apart from a few version changes (Ubuntu Server 12.04, rbenv 1.9.3p194).

Everything works fine with one website but as soon as I add another website things start to go wrong. At first nginx doesn't start and gives an error that I need to encrease my server_names_hash_bucket_size: to 64 which it's kinda weird because my domainnames for both sites aren't that long.

After changing that nginx starts again and the first site works but the second one gives an error. What's also weird is that my first sites stays the default site accessible by the ip of the server and all the domains pointing to it even though I have listen 80 default deferred; commented out.

I use this nginx.conf for both site with only the server_name different ofcourse:

upstream unicorn-<%= application %> {
  server unix:/tmp/unicorn.<%= application %>.sock fail_timeout=0;

server {
  # listen 80 default deferred;
  server_name slimmetelefoon.info;
  root <%= current_path %>/public;

  location ^~ /assets/ {
    gzip_static on;
    expires max;
    add_header Cache-Control public;

  try_files $uri/index.html $uri @unicorn;
  location @unicorn {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;
    proxy_pass http://unicorn-<%= application %>;

  error_page 500 502 503 504 /500.html;
  client_max_body_size 4G;
  keepalive_timeout 10;

Never mind I figured it out :)


$("#products").html("<%= escape_javascript(render("products")) %>");


$("#products").html("<%= escape_javascript(render("products")) %>").fadeIn(500);


Never mind I figured it out. I just added this helper function:

def sortableDesc(column, title = nil)
  title ||= column.titleize
  css_class = column == sort_column ? "current #{sort_direction}" : nil
  direction = column == sort_column && sort_direction == "desc" ? "asc" : "desc"
  link_to title, {:sort => column, :direction => direction}, {:class => css_class}

Is there a way to set the default direction of certain columns to desc?

For example Popularity that uses the amount of hits. Right now the least popular item is when you click it once...

Thanks in advance!


Anyone know how to nicely fadeIn the results? Thnx!


I have many price fields (monthly, average, total etc).

Can these getter/setter methods be rewritten for use with all my fields?


Thnx your solution works for my Dutch website where I rename my resources to Dutch words like so:

resources :users, :path => "gebruikers" do
resources :comments