Memo #1: Installing mysql and memcached gems on Mac OS X with MacPorts

Dec 22
2008 21:20 (Ruby on Rails) · Русский (503 views)

I have not posted anything here for a long time. It’s hard to start blogging again, so I will write a short tips and tricks series called “Memo“. Today I’m going to talk about two Ruby gems I’m using in all my Ruby on Rails project: mysql and memcached. Every time I try to install or update those gems on Mac OS X following error occurs:

1
2
3
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
    ERROR: Failed to build gem native extension.

And then I’m googling on how to install these gems. It’s time simplify my life and post commands here.

Read the rest of entry »

Hi, I’m Ruby on Rails

May 14
2007 18:51 (Internet, Ruby on Rails) · Русский (8,044 views)

You definitely should watch it. Gregg Pollack and Jason Seifer from RailsEnvy present:

Part 1. Ruby on Rails vs Java

Read the rest of entry »

Generating permalink from string in Ruby

May 14
2007 18:27 (Ruby on Rails) · Русский (13,080 views)

If you are creating Ruby on Rails application like a blog, you most probably want to generate URLs using post titles. It’s good practice, because search engines like keywords in URL, and it looks more human-readable. Just compare: http://example.com/posts/10 and http://example.com/posts/generating-permalinks-from-string (yeah, it’s long, but self-descriptive). Anyways, this is small post about converting a title to a permalink.

Read the rest of entry »

Rails is just…

Apr 27
2007 19:26 (Ruby on Rails) · Русский (5,489 views)

Rails is just an interface to the memcached?

Cache the Hell out Everything
90% API Requests — cache them

Read the Scaling Twitter.

Using sub-queries to avoid multiple DB requests in Rails

Apr 12
2007 08:12 (Ruby on Rails) · Русский (8,546 views)

When I worked on Best Tech Videos with Alexey Kovyrin, we faced a problem of filtering videos by category with selecting posts categories in the same query. It was easy to solve the problem, but there is one query optimization trick exists.

Read the rest of entry »

 
Copyright © 2005 - 2008, Dmytro Shteflyuk