I have installed sinatra gems on local machine(Ruby 2.x) and server(Ruby 1.8.x). It worked well in my local machine but failing in server. Please help me in resolving this if anyone else encountered this before.
require 'rubygems'
require 'sinatra'
get '/' do
'Hello world!'
end
ruby --version
ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
gem list
rack (1.6.4)
rack-protection (1.5.3)
sinatra (1.4.6)
tilt (2.0.1)
Exception
ruby/1.8/gems/rack-1.6.4/lib/rack/handler.rb:22:in
const_get': wrong number of arguments (2 for 1) (ArgumentError) from \\..gem/ruby/1.8/gems/rack-1.6.4/lib/rack/handler.rb:22:inget' from \..gem/ruby/1.8/gems/sinatra-1.4.6/lib/sinatra/base.rb:1777:indetect_rack_handler' from \\..gem/ruby/1.8/gems/sinatra-1.4.6/lib/sinatra/base.rb:1775:ineach' from \..gem/ruby/1.8/gems/sinatra-1.4.6/lib/sinatra/base.rb:1775:indetect_rack_handler' from \\..gem/ruby/1.8/gems/sinatra-1.4.6/lib/sinatra/base.rb:1437:inrun!' from \..gem/ruby/1.8/gems/sinatra-1.4.6/lib/sinatra/main.rb:25