[Ironruby-core] Sinatra fails on both 0.3 and custom build

Ben Hall ben2004uk at googlemail.com
Wed Apr 22 17:57:14 EDT 2009


Hello,

Just tried to run Sinatra however running into some difficultly.
Firstly, I installed Sinarta via gems.  I then tried the sample off
their website:
require 'rubygems'
require 'sinatra'
get '/hi' do
  "Hello World!"
end

When running it via ir I get the following error message:

E:\IronRubyGit\ironruby\Merlin\Main\bin\Debug>ir hi.rb
E:\IronRubyGit\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\IoOps.cs:711:in
`OpenFileForRead':
No such file or directory - sinatra.rb (Errno::ENOENT)
        from :0:in `read'
        from base.rb:605:in `use_in_file_templates!'
        from (__DELEGATE__):1:in `use_in_file_templates!'
        from sinatra.rb:0
        from :0:in `require'
        from custom_require.rb:26:in `require'
        from hi.rb:0

E:\IronRubyGit\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\IoOps.cs:711:in
`OpenFileForRead':
No such file or directory - sinatra.rb (Errno::ENOENT)
        from :0:in `read'
        from base.rb:605:in `use_in_file_templates!'
        from (__DELEGATE__):1:in `use_in_file_templates!'
        from sinatra.rb:0
        from :0:in `require'
        from custom_require.rb:26:in `require'
        from hi.rb:0


After a bit of searching, I found that it works via rbd. So I can
dev.bat and got the following:

E:\IronRubyGit\ironruby\Merlin\Main\bin\Debug>rbd hi.rb

E:\IronRubyGit\ironruby\Merlin\Main\bin\Debug>


It didn't fail, but it also didn't do what I expected.  What I
expected was this:
E:\IronRubyGit\ironruby\Merlin\Main\bin\Debug>ruby hi.rb
== Sinatra/0.9.1.1 has taken the stage on 4567 for development with
backup from WEBrick
[2009-04-22 22:55:52] INFO  WEBrick 1.3.1
[2009-04-22 22:55:52] INFO  ruby 1.8.6 (2007-09-24) [i386-mswin32]
[2009-04-22 22:55:52] INFO  WEBrick::HTTPServer#start: pid=6012 port=4567

Am I doing something wrong or is Sinatra not yet supported?

Thanks

Ben


More information about the Ironruby-core mailing list