'libcurl.so.4.dll':参数不正确。 Windows上的Rails + LibCurl

时间:2019-02-19 21:47:04

标签: ruby-on-rails windows libcurl ffi

我在Windows 10上使用rubyinstaller安装了Ruby 2.6.0 x64。

Bundler似乎工作正常,但我无法使用rake个任务或rails个动作,包括rails s。跟踪的错误如下:

F:\Projects\ruby\myproject>rails db:migrate --trace
rails aborted!
LoadError: Could not open library 'libcurl': The parameter is incorrect.
.
Could not open library 'libcurl.dll': The parameter is incorrect.
.
Could not open library 'libcurl.so.4': The parameter is incorrect.
.
Could not open library 'libcurl.so.4.dll': The parameter is incorrect.
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ffi-1.9.15/lib/ffi/library.rb:147:in `block in ffi_lib'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ffi-1.9.15/lib/ffi/library.rb:100:in `map'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ffi-1.9.15/lib/ffi/library.rb:100:in `ffi_lib'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ethon-0.12.0/lib/ethon/curls/settings.rb:7:in `<module:Curl>'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ethon-0.12.0/lib/ethon/curls/settings.rb:2:in `<module:Ethon>'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ethon-0.12.0/lib/ethon/curls/settings.rb:1:in `<top (required)>'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ethon-0.12.0/lib/ethon/curl.rb:27:in `<module:Curl>'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ethon-0.12.0/lib/ethon/curl.rb:13:in `<module:Ethon>'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ethon-0.12.0/lib/ethon/curl.rb:8:in `<top (required)>'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ethon-0.12.0/lib/ethon.rb:15:in `<top (required)>'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/typhoeus-1.3.1/lib/typhoeus.rb:2:in `<top (required)>'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:81:in `require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:76:in `each'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:76:in `block in require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:65:in `each'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:65:in `require'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler.rb:114:in `require'
F:/Projects/ruby/myproject/config/application.rb:21:in `<top (required)>'
F:/Projects/ruby/myproject/Rakefile:4:in `require_relative'
F:/Projects/ruby/myproject/Rakefile:4:in `<top (required)>'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/rake_module.rb:29:in `load'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/rake_module.rb:29:in `load_rakefile'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:703:in `raw_load_rakefile'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:104:in `block in load_rakefile'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:103:in `load_rakefile'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:22:in `block in perform'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:20:in `perform'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.2/lib/rails/command.rb:48:in `invoke'
F:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.2/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'

我认为这与Windows上的The famous specified module libcurl.dll could not be found错误相同,但是此错误并没有报告它丢失或存在任何错误,并且似乎对任何libcurl.dll都没有反应复制(libcurl-x64.dll中新放置的F:\Ruby26-x64\bin或重新启动:(

什么参数是错误的,我该如何解决?

0 个答案:

没有答案