ruby on rails - Why won't Sinatra work correctly? -


i trying set amazon ec2 instance run rails , sinatra apps. problem - sinatra won't start. when try run .rb file, throws this:

$ ruby hello.rb  /usr/local/rvm/gems/ruby-1.8.7-p334/gems/sinatra-1.2.5/lib/sinatra/base.rb:1144:in `define_method': tried create proc object without block (argumenterror)         /usr/local/rvm/gems/ruby-1.8.7-p334/gems/sinatra-1.2.5/lib/sinatra/base.rb:1144:in `compile!'         /usr/local/rvm/gems/ruby-1.8.7-p334/gems/sinatra-1.2.5/lib/sinatra/base.rb:1129:in `route'         /usr/local/rvm/gems/ruby-1.8.7-p334/gems/sinatra-1.2.5/lib/sinatra/base.rb:1111:in `get'         /usr/local/rvm/gems/ruby-1.8.7-p334/gems/sinatra-1.2.5/lib/sinatra/base.rb:1474:in `send'         /usr/local/rvm/gems/ruby-1.8.7-p334/gems/sinatra-1.2.5/lib/sinatra/base.rb:1474:in `get'         hello.rb:4 

now, thought specific ec2. set rvm on mac , tried same - same result. thought might specific version of ruby being used (1.9.2). not - problem persists 1.8.7. now, lost. here list of gems installed on ec2 instance:

$ gem list  *** local gems ***  abstract (1.0.0) actionmailer (3.0.7) actionpack (3.0.7) activemodel (3.0.7) activerecord (3.0.7) activeresource (3.0.7) activesupport (3.0.7) arel (2.0.9) builder (2.1.2) bundler (1.0.12) coderay (0.9.7) erubis (2.6.6) i18n (0.5.0) mail (2.2.19) method_source (0.4.1) mime-types (1.16) polyglot (0.3.1) pry (0.8.3) rack (1.2.2) rack-mount (0.6.14) rack-test (0.5.7) rails (3.0.7) railties (3.0.7) rainbow (1.1.1) rake (0.8.7) ruby_parser (2.0.6) sexp_processor (3.0.5) sinatra (1.2.5) slop (1.5.3) thor (0.14.6) tilt (1.3) treetop (1.4.9) tzinfo (0.3.27) 

please let me know think of - appreciated.

looks it's bug in sinatra: https://github.com/sinatra/sinatra/issues/258.

as workaround, try previous version of sinatra: gem install sinatra -v 1.2.3, either in new rvm gemset, or specify version want in file gem 'sinatra' '=1.2.3' before require sinatra line.

update:

sinatra 1.2.5 (the version @ fault) has been yanked , new version released. getting error can gem update sinatra , use updated gem.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -