Thursday, November 6th, 2008
Debian Etch with backports
Add this line in sources.list to get rails > 1.8.5 in rails etch
deb http://www.backports.org/debian etch-backports main contrib non-free
# deb ftp://ftp.nz.debian.org/backports etch-backports main contrib non-free
apt-get install debian-backports-keyring
aptitude update
# some ruby stuff
aptitude install -t etch-backports ruby1.8-dev libmysqlclient15off libmysqlclient15-dev mysql-common mysql-client libmysql-ruby1.8
# some system utils/libs
aptitude install apt-utils build-essential mysql-server mysql-common ...
Posted in Rails | No Comments »
Friday, September 5th, 2008
My Syslog-ng.conf file
The interesting part is the final flag which tells the syslog not to process any further the message. This way the message stays only in the rails application logfile.
log { source(src); filter(f_rails); destination(rails_log); flags(final); };
Here is the whole conf file
(more...)
Posted in Uncategorized | No Comments »
Tuesday, August 26th, 2008
General Notes
Very nice tutorial for rails 2.1 caching.
API references: Fragments, Sweepers, the Store
Post how to move the page cache in a folder with some server examples
Observing Controllers with Sweepers
Here is described how you can use the Sweepers to observe controller actions. I totaly agree that the documenation is very bad ...
Posted in Rails | No Comments »
Tuesday, August 19th, 2008
downloaded from here
documentation here
If you want to try different solution check it haproxy (more...)
Posted in Administration, Rails | No Comments »
Thursday, July 17th, 2008
Rails action to send binary data
I have one old application where the attachment is store as an id in the filesystem. The customer wants to have the attachment with the right name. So I have made this small action which accepts the id of the requested object and send the ...
Posted in Rails | No Comments »
Tuesday, July 1st, 2008
Here is how to make random images generation for your website.
First you must put your images in a folder /public/images/random_images or what ever.
Second you put images there and mark the filenames with a prefix, which image to which section will be visible on.
index_bottom_1.jpg -> for the index page on the ...
Posted in Rails | 1 Comment »
Monday, June 16th, 2008
Its aways nice to know whats going on in rails field
http://railsenvy.com/2008/6/2/Railsconf-videos
Whats new for me was flog:
http://on-ruby.blogspot.com/2007/12/flog-profiling-complexity.html
http://ruby.sadi.st/Flog.html
Some more video links
Posted in Uncategorized | No Comments »
Friday, June 13th, 2008
I got this error when I have to upgrade one old project from rails 1.2.5 to rails 2.1
ActionController::MethodNotAllowed
Only get, head, post, put, and delete requests are allowed.
The exception:
ActionController::MethodNotAllowed (Only get, head, post, put, and delete requests are allowed.):
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routing/recognition_optimisation.rb:65:in `recognize_path'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routing/route_set.rb:384:in `recognize'
I got this ...
Posted in Rails | No Comments »
Monday, May 26th, 2008
Plugins & gems lists
Associations
http://www.workingwithrails.com/railsplugin/4801-has-many-polymorphs
Versioning of AR
http://github.com/fatjam/acts_as_revisable/tree/master
http://opensoul.org/2006/7/21/acts_as_audited
Scafolding
http://streamlinedframework.org/pages/about
Ajax pagination with JQuery
http://ozmm.org/posts/ajax_will_paginate_jq_style.html
Find_by_param is a nice and easy way to handle permalinks and dealing with searching for to_param values
http://github.com/bumi/find_by_param/tree/master
Asset Plugin - better than rails 2.0 integrated
http://synthesis.sbecker.net/pages/asset_packager
Image Magic
http://vantulder.net/rails/magick/
OpenID
http://wiki.rubyonrails.org/rails/pages/OpenidLoginGenerator
http://github.com/technoweenie/restful-authentication/tree/master
http://github.com/mrflip/
Model graph visualize
Article on franzens.org
http://visualizemodels.rubyforge.org/
http://rav.rubyforge.org/
http://railroad.rubyforge.org/
Simple Captcha
http://expressica.com/simple_captcha/
Memcached stuff
http://townx.org/rails_and_memcached
Good rails 2.1 overview
memcached -vv -l 127.0.0.1 -p 11211 -m 256 -P ...
Posted in Rails, Uncategorized | No Comments »
Friday, May 16th, 2008
It is very easy to handle ajax pagination as described on this post here.
I want to give one full example.
Here is how my form looks:
<% form_remote_tag :url => {
...
Posted in Rails | No Comments »