Skip to content

Commit 72ea384

Browse files
committed
async activerecord stack
1 parent 7db9c70 commit 72ea384

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

Gemfile

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@ source 'http://rubygems.org'
22

33
gem 'rails', '3.0.0.beta4'
44

5+
# async activerecord requires
6+
gem 'em-synchrony', :git => 'git://github.com/igrigorik/em-synchrony.git', :require => 'em-synchrony'
7+
gem 'mysqlplus', :git => 'git://github.com/oldmoe/mysqlplus.git', :require => 'mysqlplus'
8+
gem 'em-mysqlplus', :git => 'git://github.com/igrigorik/em-mysqlplus.git', :require => 'em-activerecord'
9+
10+
gem 'rack-fiber_pool', :require => 'rack/fiber_pool'
11+
12+
513
# Bundle edge Rails instead:
614
# gem 'rails', :git => 'git://github.com/rails/rails.git'
715

8-
gem 'sqlite3-ruby', :require => 'sqlite3'
16+
# gem 'sqlite3-ruby', :require => 'sqlite3'
917

1018
# Use unicorn as the web server
1119
# gem 'unicorn'

config.ru

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# This file is used by Rack-based servers to start the application.
22

33
require ::File.expand_path('../config/environment', __FILE__)
4+
5+
use Rack::FiberPool
46
run AsyncRails3::Application

config/database.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# SQLite version 3.x
22
# gem install sqlite3-ruby (not necessary on OS X Leopard)
33
development:
4-
adapter: sqlite3
5-
database: db/development.sqlite3
4+
adapter: em_mysqlplus
5+
database: widgets
66
pool: 5
77
timeout: 5000
88

config/environments/development.rb

+2
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@
1616

1717
# Don't care if the mailer can't send
1818
config.action_mailer.raise_delivery_errors = false
19+
20+
config.threadsafe!
1921
end

config/routes.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@
5454

5555
# This is a legacy wild controller route that's not recommended for RESTful applications.
5656
# Note: This route will make all actions in every controller accessible via GET requests.
57-
# match ':controller(/:action(/:id(.:format)))'
57+
match ':controller(/:action(/:id(.:format)))'
5858
end

0 commit comments

Comments
 (0)