首页 文章

在Windows上为现有ROR应用程序设置本地服务器的指导

提问于
浏览
0

我是ROR的新手,我正在尝试在本地服务器上运行现有的rails应用程序 . 但是当我尝试迁移数据库时,它以某种方式失败了 . 请参阅下面的完整描述

耙子流产! LoadError:无法加载此类文件 - eventmachine C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:在require'C:/ Ruby24-x64 / lib / ruby / gems / 2.4.0 / gems / activesupport-5.0.7 / lib / active_support / dependencies.rb:293:inblock in require'C:/Ruby24-x64/lib/ruby/gems/2.4 .0 / gems / activesupport-5.0.7 / lib / active_support / dependencies.rb:259:在load_dependency中'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.0.7/lib /active_support/dependencies.rb:293:inrequire'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thin-1.7.2/lib/thin.rb:7:in <top(必填) >'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:81:inrequire'C:/Ruby24-x64/lib/ruby/ gems / 2.4.0 / gems / bundler-1.16.4 / lib / bundler / runtime.rb:81:在需要'C:/Ruby24-x64/lib/ruby/gems/2.4.0/的块(2级)中gems / bundler-1.16.4 / lib / bundler / runtime.rb:76:ineach'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.4/lib/bundler/runtime .rb:76:在require'C:/ Ruby24-x64 / lib / r中的块中uby / gems / 2.4.0 / gems / bundler-1.16.4 / lib / bundler / runtime.rb:65:ineach'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16 .4 / lib / bundler / runtime.rb:65:在require'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.4/lib/bundler.rb:114:inrequire 'C:/promotracks-rails/config/application.rb:7:in <top(required)>'C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:inrequire 'C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require'C:/ promotracks-rails / Rakefile:4:in'C:/ Ruby24-x64 / lib /ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in load'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake -12.3.1 / lib / rake / rake_module.rb:29:inload_rakefile'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb: 703:在raw_load_rakefile中'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:104:load_rakefile中的inblock'C:/ Ruby24-x64 /lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in standard_exception_handl ing'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:103:inload_rakefile'C:/ Ruby24-x64 / lib / ruby / gems / 2.4.0 / gems / rake-12.3.1 / lib / rake / application.rb:82:在运行'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-中的块中12.3.1 / lib / rake / application.rb:186:instandard_exception_handling'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:80 :在运行'C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.3.1/exe/rake:27:in'C:/ Ruby24-x64 / bin / rake:23:在加载'C:/ Ruby24-x64 / bin / rake:23:in'

(我安装了ruby,rails,gem和bundler)

2 回答

  • 0

    它的主旨Rails应用程序与Windows环境不兼容所以只需切换到mac或linux .

  • 0

    根据帖子中分享的日志:

    尽管eventmachine是作为x64-mingw平台gem提供的,但它不支持早期修复的ruby-2.4或2.5 . 所以会建议你做以下事情:

    首先,(在Windows Ruby 2.4上)确保删除所有版本的eventmachine,例如

    gem uninstall eventmachine
    

    然后使用下面提到的命令重新安装:

    gem install eventmachine --platform ruby
    

相关问题