Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
.gitignore
README.rdoc
Rakefile
benchmarks.txt
metal.example.rb
rails_template.rb

README.rdoc

Sinatra as Rails Metal

Steps:

  1. Install Edge Rails:

$ cd ~/
$ git clone git://github.com/rails/rails.git
  1. Generate Rails 2.3 application by running:

$ ruby ~/rails/railties/bin/rails metal -m rails_template.rb -d mysql
  1. Generate new Metal:

$ cd metal && script/generate metal api
  1. Copy Sinatra to Metal:

$ cp ../metal.example.rb app/metal/api.rb
  1. Run Rails:

$ script/server
  1. Try out Metal (localhost:3000/api/products/953125641/in_stock.json etc)

  2. Stop Rails and run Metal in separate process:

$ rackup app/metal/api.rb -p 4000