Reputation: 2989
I would like to create a Ruby on Rails website that uses Parse https://github.com/adelevie/parse-ruby-client which I found at https://parse.com/docs/api_libraries . Really I would like the website and an Android phone to be able to communicate. But push notifications are my main priority.
Here is my problem: I cannot get parse-ruby-client to work at all. I am still fairly new to rails. When I try to install parse-ruby-client I get the following error:
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
I'm using rails 3.2.3 on heroku but really I'll use any version. I just want to get this to work. I thought perhaps the latest build had a problem so I downloaded a release but I'm not sure how to use it in the project since it is not a gem. This answer leads me to believe it is possible: https://parse.com/questions/parse-ruby-client-gem . I did try to use the Parse Rails Bootstrap but could not get that to work either. I would like to.
Any kind of help would be appreciated. I have been stuck on this for a while. Are there easier or better ways to do this? I want to use Rails.
Upvotes: 0
Views: 866
Reputation: 775
Put gem 'parse-ruby-client', git: 'https://github.com/adelevie/parse-ruby-client.git' in your gem file and visit https://github.com/adelevie/parse-ruby-client/blob/master/example.rb for more example
Upvotes: 0
Reputation: 998
You do not seem to have the libcurl libraries installed.
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.
Try installing them from your OS repos. Like for Ubuntu:
sudo apt-get install libcurl4-openssl-dev
Upvotes: 2