ruby 脚本/服务器错误缺少 msvcrt-ruby191.dll

发布于 2024-10-24 05:35:14 字数 3368 浏览 0 评论 0原文

您好,我有一个小问题,首先,我尝试在 XAMP 服务器上运行 ruby​​-on-rails 项目,每次我尝试运行“ruby script/server”命令时,都会出现一个消息窗口,提示我缺少 msvcrt-ruby191 .dll

和命令提示符输出看起来像这样

d:\umer\lightfantasticapp>ruby script/server
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require': no such file to load -- geokit-rails (MissingSourceFile)

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'

from d:/umer/lightfantasticapp/vendor/plugins/geokit-rails/init.rb:1:in`evaluate_init_rb'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:158:in `evaluate_init_rb'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:154:in `evaluate_init_rb'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:48:in `load'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:38:in `load_plugins'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `each'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `load_plugins'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/libinitializer.rb:369:in `load_plugins'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/libinitializer.rb:165:in `process'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'

from d:/umer/lightfantasticapp/config/environment.rb:11

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'

from script/server:3

,请帮助我,我什至尝试卸载并重新安装框架,我也尝试安装 geokit、sql、gem,但这些都不适合我......任何建议。 .?

Hi i have a small problem, first of all im trying to run a ruby-on-rails project on the XAMP server ever time i try to run the "ruby script/server" command a messege window appears saying that im missing msvcrt-ruby191.dll

and the command prompt output looks something like this

d:\umer\lightfantasticapp>ruby script/server
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require': no such file to load -- geokit-rails (MissingSourceFile)

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'

from d:/umer/lightfantasticapp/vendor/plugins/geokit-rails/init.rb:1:in`evaluate_init_rb'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:158:in `evaluate_init_rb'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:154:in `evaluate_init_rb'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:48:in `load'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:38:in `load_plugins'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `each'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `load_plugins'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/libinitializer.rb:369:in `load_plugins'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/libinitializer.rb:165:in `process'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'

from d:/umer/lightfantasticapp/config/environment.rb:11

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'

from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'

from script/server:3

kindly help me, ive even tried uninstalling and reinstalling the frame work, i tried to install the geokit, sql, gem as well but none of that worked for me... any suggetions..?

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

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

发布评论

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

评论(1

冷月断魂刀 2024-10-31 05:35:14

如果安装的 gem 是针对您尚未安装的 1.9.1 ruby​​ 编译的,则会抛出此错误

正如您所看到的,在尝试需要 gem 时会抛出错误
C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29

我猜它是 json 或 mysql gem(你使用 mysql 吗?)

解决方案是卸载 gem 并安装它带有 --platform=ruby 标志
gem 卸载 json
gem install json --platform=ruby -v=1.4.6

This error is thrown if a gem installed is compiled against 1.9.1 ruby which you don't have installed

As you see the error is thrown while trying to require a gem
C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29

I would guess it is either json or mysql gem (do you use mysql?)

the solution is to uninstall the gem and install it with the --platform=ruby flag
gem uninstall json
gem install json --platform=ruby -v=1.4.6

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