Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

nessur's Profile

GitHub User: rguggemos

Comments by nessur


try the latest master from github, this changeset added generic(Kaminari AND WillPaginate) pagination support:

merge from pull #67

I <3 Kaminari w/ Sunspot.


The biggest obstacle with setting up Sunspot in a production environment was just setting it up with a process monitor, like monit. I recently submitted a patch for Sunspot so that you can set the directory for the PID file, and it was accepted, so there's really nothing left to stop you from using 'rake sunspot:solr:start' as a startup task.

See:Configuring Solr


Geokit wasn't working in Rails 3, when we tried to use it earlier this year.


For a production grade environment, on an Ubuntu server, I installed redis on its own:

sudo apt-get install redis-server

which then also gave me the 'redis' script in /etc/init.d, let things run in the background, etc. Though, note that the redis.conf get's put in /etc/redis/redis.conf.


There is a /public directory inside resque's gem directory, and you need to symlink it to your application's /public directory.

That, or change this line:

config.serve_static_assets = true

in your config/production.rb file.

Having no desire to make/let rails serve assets, I went with the former option.


This comment is slightly implementation specific, but if anyone is trying to use Postgres with Passenger for a production environment, Resque workers seems to lose their DB connections when the forking happens.

Basically, everything can still work properly, but your resque.rake file needs to be setup like this:

require 'resque/tasks'
require 'resque_scheduler/tasks'

task "resque:setup" => :environment do  
  Resque.before_fork = { ActiveRecord::Base.establish_connection }

Anyone figure out what this problem is?

I'm running rails 3.0.9, ruby 1.8.7, with passenger.


This last part starts redis in the foreground?

Maybe my Ubuntu config is disagreeable somewhere.


For the AJAX version,

you add a ":remote => true" argument to the paginate() call from index.html, then add something like this to the index.js.erb:

No application.js hooks needed, with unobtrusive JS, since any link with data-remote already has a .live() hook attached to it.


Kaminari ajax pager, details in gist:

No extra application.js hooks needed.