public this repo is viewable by everyone
Description: Run multiple framework / rack app / wathever inside the same VM
Clone URL: git://github.com/macournoyer/rack_sandbox.git
More accurate README
macournoyer (author)
about 1 month ago
commit  76421805e5db5e380dfa3eadcd67dae8916fd277
tree    49487cc012b179b33daf2293e5c0975d452ab60e
parent  95167f5720d92c1d2a3a02b9ba5963ac8aaa1cac
...
17
18
19
20
21
22
23
 
 
24
25
26
27
28
 
 
29
30
31
32
33
34
35
 
36
37
38
 
 
 
 
39
40
41
...
17
18
19
 
 
 
 
20
21
22
 
 
 
 
23
24
25
26
27
28
29
30
 
31
32
33
34
35
36
37
38
39
40
41
0
@@ -17,25 +17,25 @@ In config.ru:
0
 
0
  require 'rack/adapter/sandboxed_rails'
0
 
0
- map '/rails1' do
0
- run Rack::Adapter::Sandbox.new %{
0
- Rack::Adapter::Rails.new(:root => '/path/to/a/rails_app', :prefix => '/rails1')
0
- }
0
+ map 'http://myfirstapp.com' do
0
+ run Rack::Adapter::SandboxedRails.new(:root => '/path/to/a/rails_app')
0
  end
0
- map '/rails2' do
0
- run Rack::Adapter::Sandbox.new %{
0
- Rack::Adapter::Rails.new(:root => '/path/to/another/rails_app', :prefix => '/rails2')
0
- }
0
+ map 'http://mysecondapp.com' do
0
+ run Rack::Adapter::SandboxedRails.new(:root => '/path/to/another/rails_app')
0
  end
0
 
0
 Run using Thin:
0
 
0
  thin start -r config.ru
0
 
0
-You first Rails app will be available at /rails1 and the second one under /rails2.
0
+You first Rails app will be available at http://myfirstapp.com and the second one under http://mysecondapp.com.
0
 
0
 Enjoy!
0
 
0
+=== Limitation
0
+The Rack Sandbox is still very hackish, it's works with very bare bone Rails application,
0
+no gems, no session, no database. Some more hacking needs to be done to support a full app.
0
+
0
 === License
0
 Ruby License, http://www.ruby-lang.org/en/LICENSE.txt
0
 (C) Marc-Andre Cournoyer <macournoyer@gmail.com>

Comments

    No one has commented yet.