我想创建一个 Ruby on Rails 网站,该网站使用我在https://github.com/adelevie/parse-ruby-client找到的 Parse https://parse.com/docs/api_libraries。我真的希望该网站和 Android 手机能够进行通信。但推送通知是我的主要优先事项。
这是我的问题:我无法让parse-ruby-client工作。我还是相当新的铁路。当我尝试安装parse-ruby-client时出现以下错误:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing parse-ruby-client:
ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for curl-config... no
checking for main() in -lcurl... 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
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/RailsInstaller/Ruby1.9.3/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:39:in `<main>': 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:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/patron-0.4.18 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/patron-0.
4.18/ext/patron/gem_make.out
我在heroku上使用rails 3.2.3,但实际上我会使用任何版本。我只想让它发挥作用。 我想也许最新版本有问题,所以我下载了一个版本,但我不知道如何在项目中使用它,因为它不是一个宝石。 这个答案让我相信它是可能的:https://parse.com/questions/parse-ruby-client-gem。 我确实尝试使用 Parse Rails Bootstrap 但是无法使用它。我想。
任何形式的帮助将不胜感激。我被困在这一段时间了。 是否有更简单或更好的方法来做到这一点? 我想使用Rails。
答案 0 :(得分:2)
您似乎没有安装libcurl库。
ERROR: Error installing parse-ruby-client:
ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for curl-config... no
checking for main() in -lcurl... 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.
尝试从您的操作系统回购中安装它们。喜欢Ubuntu:
sudo apt-get install libcurl4-openssl-dev
答案 1 :(得分:0)
穿戴 gem'parse-ruby-client',git:'https://github.com/adelevie/parse-ruby-client.git' 在您的gem文件中,访问https://github.com/adelevie/parse-ruby-client/blob/master/example.rb以获取更多示例