ruby 1.8 でファイルのアップロードをしようとしていますが、すぐに使える優れたソリューションがないようです。それらはすべて、サードパーティのパッチまたはプロジェクトのフォークが機能する必要があるようです。私は mechanize を使用しますが、実際には xml API とやり取りする必要があり、mechanize は Web ページを直接処理するために特別に作成されているようです。私はRestClientを試しましたが、すぐに使えるマルチパートフォームの機能はありません。プロジェクトのフォークを使用して機能させる必要があります。同様の状況が Net:HTTP にも存在するようです。私が計画している他のことのためにマルチカールをとにかく使用したいかもしれないので、縁石が行くべき道だと思います。ただし、私の Windows マシンでは、curb gem をインストールできないようです。gem install curb で、curl ライブラリの場所を指定する必要があるというエラーが表示されます。オプションを extconf に渡そうとしましたが、今のところ成功していません。これは、オプションなしの gem install curb の出力です
C:\ruby\lib\ruby\gems\1.8\gems\curb-0.5.4.0>gem install curb
Building native extensions. This could take a while...
ERROR: Error installing curb:
ERROR: Failed to build gem native extension.
C:/ruby/bin/ruby.exe extconf.rb
checking for curl-config... no
checking for main() in curl.lib... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--srcdir=.
--curdir
--ruby=C:/ruby/bin/ruby
--with-curl-dir
--without-curl-dir
--with-curl-include
--without-curl-include=${curl-dir}/include
--with-curl-lib
--without-curl-lib=${curl-dir}/lib
--with-curllib
--without-curllib
extconf.rb:12: Can't find libcurl or curl/curl.h (RuntimeError)
Try passing --with-curl-dir or --with-curl-lib and --with-curl-include
options to extconf.
Gem files will remain installed in C:/ruby/lib/ruby/gems/1.8/gems/curb-0.5.4.0 for inspection.
Results logged to C:/ruby/lib/ruby/gems/1.8/gems/curb-0.5.4.0/ext/gem_make.out
これを機能させる方法はありますか?