Created
November 10, 2011 19:51
-
-
Save catsby/1355964 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rack' | |
require ::File.expand_path('../myapp', __FILE__) | |
run MyApp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'guillotine' | |
require 'riak/client' | |
module MyApp | |
class App < Guillotine::App | |
client = Riak::Client.new :protocol => 'http', :port => 8091 | |
bucket = client['guillotine'] | |
set :db => Guillotine::Adapters::RiakAdapter.new(bucket) | |
get '/' do | |
redirect 'http://github.com' | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dev git:master ❯ rackup | |
[2011-11-10 13:45:27] INFO WEBrick 1.3.1 | |
[2011-11-10 13:45:27] INFO ruby 1.9.2 (2011-07-09) [x86_64-darwin11.2.0] | |
[2011-11-10 13:45:27] INFO WEBrick::HTTPServer#start: pid=34385 port=9292 | |
NoMethodError: undefined method `call' for MyApp:Module | |
/Users/clint/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/lint.rb:48:in `_call' | |
/Users/clint/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/lint.rb:36:in `call' | |
/Users/clint/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/showexceptions.rb:24:in `call' | |
/Users/clint/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/commonlogger.rb:20:in `call' | |
/Users/clint/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/chunked.rb:41:in `call' | |
/Users/clint/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/content_length.rb:14:in `call' | |
/Users/clint/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/handler/webrick.rb:59:in `service' | |
/Users/clint/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' | |
/Users/clint/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' | |
/Users/clint/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' | |
127.0.0.1 - - [10/Nov/2011 13:45:31] "GET / HTTP/1.1" 500 38178 0.0418 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment