Forum: IronRuby Sinatra fails on both 0.3 and custom build

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D4ced0fe3718f187173fc05dd7f33f57?d=identicon&s=25 Ben Hall (Guest)
on 2009-04-23 00:47
(Received via mailing list)
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
E1deaac6561498a0e7472e6268ea9ccc?d=identicon&s=25 Jimmy Schementi (Guest)
on 2009-04-23 01:38
(Received via mailing list)
Haven't looked at Sinatra in a couple weeks, but I'm planning on demoing
it at RailsConf, so I'll be looking at it very soon =)
This topic is locked and can not be replied to.