/path/to/ruby-1.9.3-p392/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /tmp/s/s.rb
Hi,I just started exploring sinatra. So I entered the well knownrequire 'sinatra'get '/hi' do"Hello World!"endand ran this from within RubyMine. This resulted in this console messageC:\rubies\ruby193\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Users/jennek/ruby/sinatra.rbProcess finished with exit code 0I found out that this line in ..../gems/sinatra-1.4.2/lib/sinatra/main.rb may be the cause (line 12)set :run, Proc.new { File.expand_path($0) == File.expand_path(app_file) }because it turns out thatFile.expand_path($0) == C:/Users/jennek/ruby/sinatra.rbFile.expand_path(app_file) == C:/Users/jennek/ruby/-eand patching the line like thisset :run, true # Proc.new { File.expand_path($0) == File.expand_path(app_file) }makes sinatra run as expected--== Sinatra/1.4.2 has taken the stage on 4567 for development with backup from ThinSo it seems that the RubyMine -e command line argument interferes somehow.Indeed removing the -e argument from the RubyMine configuration makes sinatra run as expected too.However, both the main.rb patch and the configuration change are workarounds.Is there another way to make sinatra run properly under RubyMine?Am I missing something?Thanks-jennek
You received this message because you are subscribed to the Google Groups "sinatrarb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sinatrarb+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.