Mark Wilkins
2009-Jul-13 16:52 UTC
[Ironruby-core] IronRuby + Sinatra isn''t working for me
After finally watching John Lam''s PDC presentation, I thought I''d take my IronRuby a step farther and try using it to run Sinatra. I''ve used Sinatra a bit with MRI, but the behavior I''m getting with IronRuby seems a bit odd. Here''s what''s currently installed on my machine: IronRuby 0.6.0.0 Sinatra 0.9.2 (installed via igem install) so, given a simple app like: #myapp.rb require ''rubygems'' require ''sinatra'' get ''/'' do ''hello'' end and from the command line, running: $ ir myapp.rb rather than getting the expected, "==Sinatra has taken the stage...", I get: $ir -v myapp.rb IronRuby 0.6.0.0 on .NET 2.0.0.0 [E:\@archive\devlocal\ir_dev] $ and there is no server running at localhost:4567. Anyone have any ideas? Thanks, Mark
Ivan Porto Carrero
2009-Jul-13 17:10 UTC
[Ironruby-core] IronRuby + Sinatra isn''t working for me
I can''t offer any help but I can confirm that it doesn''t work for me either. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero On Mon, Jul 13, 2009 at 6:52 PM, Mark Wilkins <wilkins.mark at gmail.com>wrote:> After finally watching John Lam''s PDC presentation, I thought I''d take > my IronRuby a step farther and try using it to run Sinatra. I''ve used > Sinatra a bit with MRI, but the behavior I''m getting with IronRuby > seems a bit odd. > > Here''s what''s currently installed on my machine: > IronRuby 0.6.0.0 > Sinatra 0.9.2 (installed via igem install) > > so, given a simple app like: > #myapp.rb > require ''rubygems'' > require ''sinatra'' > > get ''/'' do > ''hello'' > end > > and from the command line, running: > $ ir myapp.rb > > rather than getting the expected, "==Sinatra has taken the stage...", I > get: > > $ir -v myapp.rb > IronRuby 0.6.0.0 on .NET 2.0.0.0 > > [E:\@archive\devlocal\ir_dev] > $ > > and there is no server running at localhost:4567. > > Anyone have any ideas? > > Thanks, > > Mark > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090713/9abd2be0/attachment.html>
Mark Wilkins
2009-Jul-13 17:21 UTC
[Ironruby-core] IronRuby + Sinatra isn''t working for me
On Mon, Jul 13, 2009 at 12:52 PM, Mark Wilkins<wilkins.mark at gmail.com> wrote:> ... > and from the command line, running: > $ ir myapp.rb > > rather than getting the expected, "==Sinatra has taken the stage...", I get: > > $ir -v myapp.rb > IronRuby 0.6.0.0 on .NET 2.0.0.0 > > [E:\@archive\devlocal\ir_dev] > $ > ...So I just tried this, and it seems to work. I created a config.ru file: #config.ru require ''myapp'' run Sinatra::Application and then started the app this way: $irackup config.ru (note: irackup, not rackup) [2009-07-13 13:05:42] INFO WEBrick 1.3.1 [2009-07-13 13:05:42] INFO ruby 1.8.6 (2008-05-28) [i386-mswin32] [2009-07-13 13:05:42] INFO WEBrick::HTTPServer#start: pid=2964 port=9292 ... So, I''m happy with that. Thanks, Mark
Jimmy Schementi
2009-Jul-13 17:21 UTC
[Ironruby-core] IronRuby + Sinatra isn''t working for me
See the Sinatra page on the website (http://ironruby.net/documentation). You need to apply two small changes since Sinatra depends on stack traces to find the entry point script. I consider this a incorrect way to do things, so anyone who''d like to clean this patch up and get it fixed in Sinatra? ~Jimmy Sent from my phone On Jul 13, 2009, at 10:11 AM, "Ivan Porto Carrero" <ivan at flanders.co.nz<mailto:ivan at flanders.co.nz>> wrote: I can''t offer any help but I can confirm that it doesn''t work for me either. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero On Mon, Jul 13, 2009 at 6:52 PM, Mark Wilkins <<mailto:wilkins.mark at gmail.com>wilkins.mark at gmail.com<mailto:wilkins.mark at gmail.com>> wrote: After finally watching John Lam''s PDC presentation, I thought I''d take my IronRuby a step farther and try using it to run Sinatra. I''ve used Sinatra a bit with MRI, but the behavior I''m getting with IronRuby seems a bit odd. Here''s what''s currently installed on my machine: IronRuby 0.6.0.0 Sinatra 0.9.2 (installed via igem install) so, given a simple app like: #myapp.rb require ''rubygems'' require ''sinatra'' get ''/'' do ''hello'' end and from the command line, running: $ ir myapp.rb rather than getting the expected, "==Sinatra has taken the stage...", I get: $ir -v myapp.rb IronRuby 0.6.0.0 on .NET 2.0.0.0 [E:\@archive\devlocal\ir_dev] $ and there is no server running at localhost:4567. Anyone have any ideas? Thanks, Mark _______________________________________________ Ironruby-core mailing list <mailto:Ironruby-core at rubyforge.org>Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org> <http://rubyforge.org/mailman/listinfo/ironruby-core>http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090713/b59039fb/attachment.html>
Mark Wilkins
2009-Jul-13 17:27 UTC
[Ironruby-core] IronRuby + Sinatra isn''t working for me
On Mon, Jul 13, 2009 at 1:21 PM, Jimmy Schementi<Jimmy.Schementi at microsoft.com> wrote:> See the Sinatra page on the website (http://ironruby.net/documentation). You > need to apply two small changes since Sinatra depends on stack traces to > find the entry point script. I consider this a incorrect way to do things, > so anyone who''d like to clean this patch up and get it fixed in Sinatra?D''oh! Sorry, Jimmy. I should have seen that. Thanks. Mark
Jimmy Schementi
2009-Jul-13 18:08 UTC
[Ironruby-core] IronRuby + Sinatra isn''t working for me
Yep, that will bypass the need for Sinatra to use stack traces to find the entry point script, so using a config.ru will work unpatched. ~Jimmy Sent from my phone On Jul 13, 2009, at 10:22 AM, "Mark Wilkins" <wilkins.mark at gmail.com> wrote:> On Mon, Jul 13, 2009 at 12:52 PM, Mark > Wilkins<wilkins.mark at gmail.com> wrote: >> ... >> and from the command line, running: >> $ ir myapp.rb >> >> rather than getting the expected, "==Sinatra has taken the >> stage...", I get: >> >> $ir -v myapp.rb >> IronRuby 0.6.0.0 on .NET 2.0.0.0 >> >> [E:\@archive\devlocal\ir_dev] >> $ >> ... > > > So I just tried this, and it seems to work. > > I created a config.ru file: > > #config.ru > require ''myapp'' > run Sinatra::Application > > and then started the app this way: > > $irackup config.ru (note: irackup, not rackup) > [2009-07-13 13:05:42] INFO WEBrick 1.3.1 > [2009-07-13 13:05:42] INFO ruby 1.8.6 (2008-05-28) [i386-mswin32] > [2009-07-13 13:05:42] INFO WEBrick::HTTPServer#start: pid=2964 > port=9292 > ... > > So, I''m happy with that. > > Thanks, > > Mark > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >