Ruby on Rails and the FreeBSD ports

Posted by Jonathan

Yesterday I tried to combine Ruby on Rails with the FreeBSD ports tree. RoR relies heavily on ruby-gems but I prefer installing programs with the ports tree.

The ideal solution would be an integration of the two like done for PHP-pear and Perl CPAN in the ports tree but this is heavy lifting.
I started with creating non-gems ports of the several packages within rails.

I created:

devel/ruby-actionsupport
www/ruby-actionpack
www/ruby-actionwebservice
databases/ruby-activerecord
mail/ruby-actionmailer

When I went on to www/rails I found out that the rails.tgz from the rubyforge website includes all packages in the vendor directory :-(

That means that I should have created only the www/rails port or (cleaner) I should extract the packages from the vendor directory and let the rails port depend on my ports. The latter would benefit if somebody wants to use the various packages alone.

I’m not sure what to do as my goal is to combine gems and the ports tree.

Apart from this work I created some update-diffs for ruby ports that are needed by rails. I sent them to their maintainer who seems to be someone really involved in the ruby-stuff on FreeBSD. Maybe I should talk to him about the ruby-gems stuff…

Anyway, you can find my work here:

rails-ports.tar.gz
ruby-fcgi.patch
ruby-mysql.patch
ruby-sqlite.patch

Comments

Leave a response