Error in requiring Sinatra gem


Error in requiring Sinatra gem



I'm having a hard time getting Sinatra running on my local setup, Ubuntu Karmic 9.10. The error getting thrown when I have require 'sinatra' is:

NoMethodError: undefined method `[]' for nil:NilClass from /usr/local/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:891:in `compile' from /usr/local/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:883:in `gsub' from /usr/local/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:883:in `compile' from /usr/local/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:856:in `route' from /usr/local/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:838:in `get' from /usr/local/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1077 from /usr/local/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:929:in `configure' from /usr/local/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1076 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 /usr/local/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra.rb:4 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from (irb):2 from :0 

I've tried:

  • Uninstalling/reinstalling Sinatra
  • Updating all gems
  • Ensuring all dependencies exist (rack)

Any ideas? Your time and help is greatly appreciated!


Linux command to find the which are the jars loaded by the jvm

1:

How to output only captured groups with sed
This is an issue apparently only coming up with 1.8-head on Linux. Recommendations for keeping a build server updatedIt is related to regexp matching. segfault during __cxa_allocate_exception in SWIG wrapped libraryIf you take a look in the code: path does match /((:\w+)|[\*#{special_chars.join}])/, although $2 is nil, even though it is supposed to be a String.. Can I use dtsearch in C++ under linux, if yes what APIshould i use? I recommend switching your ruby version for now.. boost::this_thread::disable_interruption usage confusion
Duplicate file descriptor after popen

90 out of 100 based on 35 user ratings 750 reviews

#