Tag Archives: ruby

How to Install Ruby Enterprise Edition and Passenger Phusion (mod_rails) on CentOS/RHEL x86_64

INSTALL SYSTEM PREREQUISITES Install the prerequisite development headers. If this is a production system, make note of all the packages installed, for future removal. # yum install apr-devel.x86_64 apr-util-devel.x86_64 curl-devel.x86_64 gcc-c++.x86_64 httpd-devel.x86_64 mysql-devel.x86_64 mysql-server.x86_64 openssl-devel.x86_64 zlib-devel.x86_64 INSTALL RUBY ENTERPRISE EDITION First, install the End Point yum repository: # yum update m2crypto # curl -O https://packages.endpoint.com/rhel/5/os/x86_64/endpoint-repo-1.0-1.x86_64.rpm [...]

Posted in essays | Also tagged , , , , | Leave a comment

MVC Web Frameworks: PHP vs. JVM

I am reviewing web frameworks for product development at Resource Interactive. Here are my thoughts. Please keep this in mind when reading the following: ALL of the statements below are OPINIONS. Please feel free to disagree. Problem We’ve been using CakePHP for 6 months, but recently it has been getting in our way on a [...]

Posted in essays | Also tagged , , , , , , , , , | Leave a comment

Separating behavior and persistence in models

Link: Separating behavior and persistence in models — @engineyard via @lukebayes Recall the Single Responsibility Principle: “There should never be more than one reason for a class to change.” As we commonly use them, ActiveRecord and DataMapper1 classes almost always violate this principle. There are usually at least two responsibilities handled by every AR/DM model: [...]

Posted in links | Also tagged , , | Leave a comment

Ruby Best Practices: Chapter 1

Link: Ruby Best Practices: Chapter 1

Posted in links | Tagged | Leave a comment

Easy Unobtrusive JavaScript with jQuery and Rails

Using 5 (logical) lines of code app/views/layouts/rockets.html.erb: <head> … <%= javascript_include_tag ‘http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js’ %> … </head> app/views/rockets/index.html.erb: <%= link_to(”, edit_rockets_path(@rocket), :class => ‘edit’, :title => ‘Editing Rocket’) %> public/javascripts/application.js: // when the dom is ready to be manipulated $(document).ready(function () { // for every <a class=”edit”></a> $(‘a.edit’).each(function (i) { // make the empty anchor visible by [...]

Posted in essays | Also tagged , , | Leave a comment

Installing libxml-ruby on CentOS 5.3

A typical process for public-facing production servers. Tested in i386 and x86_64 environments. Basic security protocol suggests no compilers or headers are available on public-facing servers*. Install missing compilers, headers: yum install gcc make libxml2-devel Install the libxml-ruby gem: gem install libxml-ruby –no-rdoc –no-ri Remove compilers, headers and their dependencies: yum erase gcc binutils cpp [...]

Posted in essays | Also tagged | Leave a comment

Improving Running Components at Twitter by [Evan Weaver](http://blog.evanweaver.com/)

Posted in videos | Also tagged , | Leave a comment

Distributing Rails Applications – A Tutorial

Link: Distributing Rails Applications – A Tutorial

Posted in links | Also tagged | Leave a comment