undefined method get with sinatra
- by dorelal
I have following code
require 'rubygems'
require 'sinatra'
get '/' do
'Hello World!'
end
gem list sinatra
*** LOCAL GEMS ***
sinatra (1.0, 0.9.4)
ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0]
Error
ruby myapp.rb
["==", "===", "=~", "__id__", "__send__", "class", "clone", "display", "dup", "enum_for", "eql?", "equal?", "extend", "freeze", "frozen?", "hash", "id", "include", "inspect", "instance_eval", "instance_exec", "instance_of?", "instance_variable_defined?", "instance_variable_get", "instance_variable_set", "instance_variables", "is_a?", "kind_of?", "method", "methods", "nil?", "object_id", "private", "private_methods", "protected_methods", "public", "public_methods", "respond_to?", "send", "singleton_methods", "taguri", "taguri=", "taint", "tainted?", "tap", "to_a", "to_enum", "to_s", "to_yaml", "to_yaml_properties", "to_yaml_style", "type", "untaint"]
./sinatra.rb:17: undefined method `get' for main:Object (NoMethodError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from myapp.rb:3