gissmog // Rails, Mac, Tech, CSS/Design, Fun, Hackfressen.
Today we will talk about code organization in Ruby on Rails projects. As everybody knows, Ruby on Rails is a conventional framework, which means you should follow framework architects’ decisions (put your controllers inside app/controllers, move all your logic into models, etc.) But there are many open questions around those conventions. In this write-up I will try to summarize my personal experience and show how I usually solve these problems.
Quelle: http://feedproxy.google.com/~r/kpumuk/~3/cQi-1uJhFqg/
Plog
Ruby on Rails production log statistics generator by Kazuyoshi Tlacaelel.
Dependancies:
* FileUtils
* MD5
* File
* Dir
* URI
* rubygems 1.3.3Installation
$ gem sources -a http://gems.github.com
$ gem install ktlacaelel-plog
Installing libevent
libevent is a prerequisite for memcached:
$ curl -O http://www.monkey.org/~provos/libevent-1.4.12-stable.tar.gz $ tar xzvf libevent-1.4.12-stable.tar.gz $ cd libevent-1.4.12-stable $ ./configure $ make $ make verify $ sudo make installInstalling memcached
$ curl -O http://memcached.googlecode.com/files/memcached-1.4.1.tar.gz $ tar xzvf memcached-1.4.1.tar.gz $ cd memcached-1.4.1 $ ./configure $ make $ make test $ sudo make installTesting
In my case I have a script in the script dir of a Rails application that I call whenever I want to start or stop memcached, so I just used that:
$ script/memcached memcached not running: starting $ script/memcached memcached running: stopping(The script basically just does memcached -d -P pidfile -l 127.0.0.1 to start memcached.)
See also
You want to try out all of the different ruby interpreters and versions including different patchlevels, but you don't want to break what's working for you now. No time to waste?
Use rvm. Easy installation and switching between available Ruby versions and runtimes, without messing up your current Ruby install! rvm also allows you to use multiple versions of ruby in separate terminals concurrently!