gpt4 book ai didi

ruby-on-rails - Ruby (on rails) OCRA Build 中缺少 libyaml

转载 作者:数据小太阳 更新时间:2023-10-29 08:48:50 24 4
gpt4 key购买 nike

我开发了一个非常简单的 Rails 应用程序(它根据数据库中的数据绘制了一些图表)。

现在,我的客户想要在线和离线使用此 Rails 应用程序。

所以我使用 OCRA 从中创建了一个 .exe 文件(效果很好!)。如果我在开发机器上运行我的 .exe 文件,一切都会按预期工作。将启动 Rails 服务器,我可以通过打开 127.0.0.1:3000 来使用该应用程序。

但是,如果我在不同的机器上使用相同的 .exe 文件,则会出现错误提示我需要在安装 rails 之前安装 psych/libyaml 才能正确使用 rails。

我已经使用以下命令构建了我的 OCRA 应用程序:

ocra example_sqlite_chartjs\bin\rails example_sqlite_chartjs --add-all-core --gemfile example_sqlite_chartjs\Gemfile --no-dep-run --gem-full --chdir-first --output example_sqlite_chartjs.exe -- server

我使用了来自 http://railsinstaller.org/en 的 railsinstaller(适用于 Windows)所以我认为,一切都应该包含在这里。

这家伙似乎有类似的问题: https://groups.google.com/forum/#!searchin/ruby-ocra/libyaml/ruby-ocra/D5StGPzZsbE/YLOEkAKM0-oJ

有没有人知道如何解决这个问题?

提前致谢!

菲利普

最佳答案

所以我找到了解决这个问题的方法。我所要做的就是添加依赖的 .dll,它可以在 ruby​​ 安装的 bin 目录中找到。

我已经使用这个命令来做到这一点:

ocra example_sqlite_chartjs\bin\rails example_sqlite_chartjs --add-all-core --gemfile example_sqlite_chartjs\Gemfile --no-dep-run --gem-full --dll libeay32.dll --dll libffi-6.dll --dll libgdbm_compat-3.dll --dll libgdbm-3.dll --dll libiconv-2.dll --dll libyaml-0-2.dll --dll msvcrt-ruby191.dll --dll pdcurses.dll --dll sqlite3.dll --dll ssleay32.dll --dll tcl85.dll --dll tclpip85.dll --dll tk85.dll --dll zlib1.dll --chdir-first --output example_sqlite_chartjs.exe -- server

希望这对其他人有帮助!

关于ruby-on-rails - Ruby (on rails) OCRA Build 中缺少 libyaml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19099860/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com