Errors with shotgun gem and msvcrt-ruby18.dll when running my Sinatra app

不问归期 提交于 2019-12-08 07:12:58

问题


Greetings,

Every time I make a change to a Sinatra app I'm working on and try to refresh the browser (located at http://localhost:4567/) the browser will refresh and, the console window seems to restart the WEB brick server. The problem is that the content in the browser window does not change.

A friend of mine told me it was a shotgun issue and referred me to rtomayko's shotgun gem:

http://github.com/rtomayko/shotgun

On this page I read that the shotgun gem would basically solve my problem, allowing the changes made to my app to show up in the browser window after I refresh it. So I installed the shotgun gem. The installation was successful. To activate the shotgun function you have to type shotgun before the file name. In this case my Sinatra app's file name is shortener.rb

When I type shotgun shortener.rb to run my Sinatra app I get this error:

alt text http://lh6.ggpht.com/_83PkeFeVNNk/S-ymaYEgDUI/AAAAAAAAArE/rr7uJE3dRj4/shotgun_error.png

I should also mention that before testing the shotgun method out to see if it worked, I installed the mongrel (I realize I should have checked to see if shotgun worked before doing this as installing mongrel has complicated this problem). So on top of getting the error message above I also get this pop up window from Ruby.exe

alt text http://lh6.ggpht.com/_83PkeFeVNNk/S-ymaaWIZKI/AAAAAAAAArA/8qYCGUN8Wo4/msvcrt-ruby18.dll_error.png

I have no idea what msvcrt-ruby18.dll is but I know that installing either shotgun and/or mongrel created this problem.

Where to go from here?

Thanks, Adam


回答1:


The msvcrt-ruby18.dll error is caused by Mongrel. The current release version 1.1.5 is incompatible with Ruby 1.9 and throws this error when it is run. It's easy to solve - just make sure gems is up-to-date:

gem update --system

Then install the new pre-release version of Mongrel:

gem install mongrel --pre


来源:https://stackoverflow.com/questions/2831283/errors-with-shotgun-gem-and-msvcrt-ruby18-dll-when-running-my-sinatra-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!