lunes, 30 de noviembre de 2009

Active scaffold on ruby 1.8.7

If you have rails application 2.0.2 on ruby 1.8.6 and migrate your ruby to 1.8.7, but you have active scaffold working you will find some errors. So you need to change small code on active scaffold files. Here it goes

look for the file view_helper.rb

and change this line

@params_for[:controller] = '/' + @params_for[:controller] unless @params_for[:controller].first(1) == '/' # for namespaced controllers


to

  @params_for[:controller] = '/' + @params_for[:controller] unless @params_for[:controller].chars.first == '/' # for namespaced controllers


And you are done it works.

good luck.

sábado, 21 de noviembre de 2009

Compile Ruby 1.8.7-p174, on fedora 12

There is just one issue when compiling ruby on Fedora 12, and it has to do with openssl, ruby 1.8.7-p174 works fine with openssl 0.98 but not with openssl 1.0, so you need to find openssl 0.98  from  http://www.openssl.org/source/openssl-0.9.8l.tar.gz and compile it
tar xvzf openssl-0.9.8l.tar.gz
cd openssl-0.9.8l
./config
ls
make
make check
make install