Error when starting Sinatra: “tried to create Proc object without a block”

前端 未结 1 1005
萌比男神i
萌比男神i 2021-01-20 07:10

I am very new to ruby / rails and have an issue that I have not been able to figure out but feel it should be relatively simple to fix.

Command:

1条回答
  •  情歌与酒
    2021-01-20 07:29

    From what I can tell, and I've encountered this before, v1.2.5 of Sinatra is the problem. v1.2.3 doesn't do it, so try

    gem install sinatra -v 1.2.3
    

    to install the previous version, then add:

    gem 'sinatra', '=1.2.3'
    

    before the require statement.

    This is documented as an issue.


    EDIT: Sinatra just bumped to a new version, 1.2.6, which fixes this problem. Use gem update sinatra, followed by gem uninstall sinatra -v 1.2.5 to remove the old, buggy, version.

    0 讨论(0)
提交回复
热议问题