运行我的 Sinatra 应用程序时,shotgun gem 和 msvcrt-ruby18.dll 出现错误

发布于 2024-09-01 08:15:11 字数 1425 浏览 9 评论 0原文

您好,

每次我对正在处理的 Sinatra 应用程序进行更改并尝试刷新浏览器(位于 http:// /localhost:4567/) 浏览器将刷新,控制台窗口似乎重新启动了 WEB brick 服务器。问题是浏览器窗口中的内容没有改变。

我的一个朋友告诉我这是一个霰弹枪问题,并向我推荐了 rtomayko 的霰弹枪 gem:

http://github.com /rtomayko/shotgun

在此页面上,我读到 shotgun gem 基本上可以解决我的问题,允许对我的应用程序所做的更改在刷新后显示在浏览器窗口中。所以我安装了霰弹枪宝石。安装成功。要激活 shotgun 功能,您必须在文件名前输入 shotgun。在本例中,我的 Sinatra 应用程序的文件名是 shortener.rb

当我输入 shotgun Shorter.rb 来运行我的 Sinatra 应用程序时,我收到此错误:

替代文本 http://lh6.ggpht.com/_83PkeFeVNNk/S-ymaYEgDUI/AAAAAAAAArE/rr7uJE3dRj4 /shotgun_error.png

我还应该提到,在测试 shotgun 方法以查看它是否有效之前,我安装了 mongrel (我意识到我应该在安装 mongrel 之前检查一下 shotgun 是否有效使这个问题变得复杂)。因此,除了收到上面的错误消息之外,我还从 Ruby.exe

替代文本 http://lh6.ggpht.com/_83PkeFeVNNk/S-ymaaWIZKI/AAAAAAAAArA/8qYCGUN8Wo4/msvcrt-ruby18.dll_error.png

我不知道什么 msvcrt-ruby18.dll 是,但我知道安装 shotgun 和/或 mongrel 会造成此问题。

从这里到哪里去?

谢谢, 亚当

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

贩梦商人 2024-09-08 08:15:11

msvcrt-ruby18.dll错误是由Mongrel引起的。当前发行版本 1.1.5 与 Ruby 1.9 不兼容,运行时会抛出此错误。这很容易解决 - 只需确保 gems 是最新的:

gem update --system

然后安装新的 Mongrel 预发行版本:

gem install mongrel --pre

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文