Sinatra 1.0, a micro-web framework, is having a bit of trouble with Ruby 1.9.2. Your apps just won't run, you get no output and the interpreter returns to the shell with no exceptions thrown. This (presumably) will be fixed in the next version of Sinatra, but there's a temporary workaround, and it only requires you to add a single line to your application. The line is highlighted below.
#!/usr/bin/env ruby
require 'rubygems'
require 'sinatra'
enable :run
get '/' do
"Hello, world!"
end

Thanks! That was a real head scratcher there….glad I’m not the only one that ran into this.
I had some problems with rendering erb templates from ‘./views’.
This is the error I get:
Errno::ENOENT: No such file or directory – /home/yeban/code/Sinatra/simpleSequenceSearchServer/<internal:lib/rubygems/views/search.erb
Any clue?
You have to define the views path like
LOCAL_PATH = File.dirname(__FILE__);
set :views, LOCAL_PATH + ‘/views’
or something like that
Just use Sinatra 1.1.a:
gem install sinatra –pre
That’s a good tip Konstantin, however it all depends on how your Sinatra apps are deployed. That’s only useful if your server has the pre-release gem.
I added “enable :run” line in .rb file
and getting this error while running application –
undefined method `enable’ for main:Object (NoMethodError)