undefined method get with sinatra

Posted by dorelal on Stack Overflow See other posts from Stack Overflow or by dorelal
Published on 2010-05-20T22:49:06Z Indexed on 2010/05/21 3:20 UTC
Read the original article Hit count: 431

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about ruby

Related posts about sinatra