https://github.com/macournoyer/rack-sandbox
Run multiple framework / rack app / wathever inside the same VM
https://github.com/macournoyer/rack-sandbox
Last synced: 3 months ago
JSON representation
Run multiple framework / rack app / wathever inside the same VM
- Host: GitHub
- URL: https://github.com/macournoyer/rack-sandbox
- Owner: macournoyer
- License: other
- Created: 2008-03-21T19:50:46.000Z (about 18 years ago)
- Default Branch: master
- Last Pushed: 2008-03-26T21:23:43.000Z (about 18 years ago)
- Last Synced: 2026-01-12T01:55:29.572Z (5 months ago)
- Language: Ruby
- Homepage:
- Size: 73.2 KB
- Stars: 15
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: COPYING
Awesome Lists containing this project
README
== Rack Sandbox Adapter
Run multiple framework / rack app / wathever inside the same VM
using _why Freaky Freaky Sandbox: http://code.whytheluckystiff.net/sandbox/
=== Installation
Patch Ruby and install The Sandbox:
http://code.whytheluckystiff.net/sandbox/wiki/InstallingTheSandbox
=== Usage
In config.ru:
require 'sandbox' # IMPORTANT: sandbox must be loaded before rubygems!
require 'rubygems'
require 'rack/adapter/sandboxed_rails'
map 'http://myfirstapp.com' do
run Rack::Adapter::SandboxedRails.new(:root => '/path/to/a/rails_app')
end
map 'http://mysecondapp.com' do
run Rack::Adapter::SandboxedRails.new(:root => '/path/to/another/rails_app')
end
Run using Thin:
thin start -r config.ru
You first Rails app will be available at http://myfirstapp.com and the second one under http://mysecondapp.com.
Enjoy!
=== Limitation
The Rack Sandbox is still very hackish, it's works with very bare bone Rails application,
no gems, no session, no database. Some more hacking needs to be done to support a full app.
=== License
Ruby License, http://www.ruby-lang.org/en/LICENSE.txt
(C) Marc-Andre Cournoyer