我已经开发了一个非常简单的rails应用程序(它根据数据库中的数据绘制一些图表)。
现在,我的客户想在线和离线使用这个rails应用程序。
因此,我使用OCRA创建了一个.exe文件(效果很好!)。如果我在开发机器上运行我的.exe文件,一切都会正常工作。rails服务器将启动,我可以通过打开127.0.0.1:3000来使用该应用程序。
但是,如果我在不同的机器上使用相同的.exe-File,就会出现一个错误,提示我需要在rails之前安装install / 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的think安装程序(windows版),所以我认为所有的东西都应该包含在这里。
这个人似乎也有类似的问题:https://groups.google.com/forum/#!searchin/ruby-ocra/libyaml/ruby-ocra/D5StGPzZsbE/YLOEkAKM0-oJ
有谁知道怎么解决这个问题吗?
提前感谢!
菲利普
发布于 2013-10-02 00:09:21
所以我找到了解决这个问题的办法。我所要做的就是添加相关的.dlls,它可以在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希望这对任何人都有帮助!
https://stackoverflow.com/questions/19099860
复制相似问题