authenticate_or_request_with_http_basic and apacheSection: Ruby on Rails
If you use authenticate_or_request_with_http_basic on an apache server, sometimes the the username and password you've set seems always wrong. To fix this, put the following line in public/.htaccess:
RewriteRule ^(.*)$ dispatch.fcgi [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L]
Rails TipsSection: Ruby on Rails
These are my rails tips for the railscast contest:)
Contest link: Railscasts.com/contest

So here we go:
database.yml errorSection: Ruby on Rails
Archive entry for myself
/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 33, col 2: ` socket: /var/run/mysqld/mysqld.sock' (ArgumentError)
development:
  adapter: mysql
  encoding: utf8
  database: ****_development
  username: root
  password: ****  # there must be a space before the password!!!
  socket: /var/run/mysqld/mysqld.sock
Self-referential has_many :through associationsSection: Ruby on Rails
Sections 
- PHP (1)
- General (2)
- Ruby on Rails Snippet (3)
- Ruby on Rails (13)
- HTML (1)
- Css (1)
- regex (1)
- Photoshop (1)
- Leopard (1)
A little note to Internet Explorer users:
This site is not made for Internet Explorer. Some pages may look like shit. Yes, i could fix it for IE, but no, I'm not gonna do it. Try Opera or Firefox instead!