ru Русский

Reticularium

NETWORKS PLACE

Useful to sync gems across servers. Converts gem list --local output to a bunch of gem install commands. Rails related gems are removed from the initial list.


gem list --local | grep -v '\*' | grep -v ^$ | grep -v ^action | grep -v ^active | grep -v ^rails | grep -v ^rack | grep -v ^rake | sed 's|(|-v=|' | sed 's|)||' | sed 's|^\(.*\),|\1\n\1|' | sed 's|=.*[[:space:]]|=|' | sed 's|^|gem install |'

It’s a 2.3 bug still not fixed in 2.3.4 gems according to this thread

On my new server with Rails 2.3.4 installed it looks like this:

I run script/plugin install git://github.com/whatever/plugin.git and then just nothing happens.

Recipe from above mentioned thread works for me, so I have to run instead:


script/plugin install http://github.com/whatever/plugin.git/

Note slash at the end!

Quite a common mistake.

Never use :update option of PrototypeHelper methods (like link_to_remote) together with RJS templates. Simply remove :update and RJS will care about it. Another option is to avoid using RJS if possible.

Had to spend some time to figure out:


Person.find :all, :conditions => [ "user_name = ? AND surname = ? AND address = ?", user_name, surname, address]