Skip to content

Instantly share code, notes, and snippets.

@blt
Created Jul 20, 2011
Embed
What would you like to do?
require 'rubygems'
require 'sinatra'
get '/' do
"Hello and Goodbye"
end
get '/hi' do
"Hello World! :)"
end
get '/bye' do
"Goodbye World! :("
end
require 'rubygems'
require 'sinatra'
require 'app'
run Sinatra::Application
Boot Error
Something went wrong while loading config.ru
LoadError: no such file to load -- app
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
config.ru:4:in `block in inner_app'
/usr/lib/ruby/gems/1.9.1/gems/rack-1.3.1/lib/rack/builder.rb:51:in `instance_eval'
/usr/lib/ruby/gems/1.9.1/gems/rack-1.3.1/lib/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `inner_app'
/usr/lib/ruby/gems/1.9.1/gems/shotgun-0.9/lib/shotgun/loader.rb:112:in `eval'
/usr/lib/ruby/gems/1.9.1/gems/shotgun-0.9/lib/shotgun/loader.rb:112:in `inner_app'
/usr/lib/ruby/gems/1.9.1/gems/shotgun-0.9/lib/shotgun/loader.rb:102:in `assemble_app'
/usr/lib/ruby/gems/1.9.1/gems/shotgun-0.9/lib/shotgun/loader.rb:86:in `proceed_as_child'
/usr/lib/ruby/gems/1.9.1/gems/shotgun-0.9/lib/shotgun/loader.rb:31:in `call!'
/usr/lib/ruby/gems/1.9.1/gems/shotgun-0.9/lib/shotgun/loader.rb:18:in `call'
/usr/lib/ruby/gems/1.9.1/gems/shotgun-0.9/lib/shotgun/favicon.rb:12:in `call'
/usr/lib/ruby/gems/1.9.1/gems/rack-1.3.1/lib/rack/builder.rb:134:in `call'
/usr/lib/ruby/gems/1.9.1/gems/rack-1.3.1/lib/rack/handler/webrick.rb:59:in `service'
/usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
source :rubygems
gem "sinatra", "1.2.6"
gem "shotgun", "0.9"
$ ls
app.rb config.ru Gemfile Gemfile.lock README.md
$ shotgun
== Shotgun/WEBrick on http://127.0.0.1:9393/
[2011-07-20 11:49:33] INFO WEBrick 1.3.1
[2011-07-20 11:49:33] INFO ruby 1.9.2 (2011-07-09) [i686-linux]
[2011-07-20 11:49:33] INFO WEBrick::HTTPServer#start: pid=11300 port=9393
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment