Created
October 24, 2009 10:00
-
-
Save mrchrisadams/217464 to your computer and use it in GitHub Desktop.
This file contains 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
# example code straight from the website: | |
require 'rubygems' | |
require 'sinatra' | |
get '/hi' do | |
"Hello World!" | |
end |
This file contains 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
sudo gem install sinatra | |
Password: | |
Successfully installed sinatra-0.9.4 | |
1 gem installed | |
Installing ri documentation for sinatra-0.9.4... | |
Updating ri class cache with 5063 classes... | |
Installing RDoc documentation for sinatra-0.9.4... | |
~/Desktop$ ruby sinatra.rb | |
./sinatra.rb:3: 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 sinatra.rb:2 |
This file contains 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
~/Desktop$ irb | |
>> require 'sinatra' | |
NoMethodError: undefined method `get' for main:Object | |
from ./sinatra.rb:3 | |
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 (irb):1 | |
>> require 'rubygems' | |
=> false | |
>> require 'rubygems' | |
=> false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment