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
Jimmy Schementi
2009-Apr-22 23:11 UTC
[Ironruby-core] Sinatra fails on both 0.3 and custom build
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 =)> -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Ben Hall > Sent: Wednesday, April 22, 2009 2:57 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Sinatra fails on both 0.3 and custom build > > 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_RESTRI > CTED\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_RESTRI > CTED\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 > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core