0
votes

I am making contact form in rails app and when tried to bundle install i got error from gem i never added to gemfile. Some mysterious curb gem lack some libraries or something else.

I have looked for answers but can't figure out what they are saying, because of their platforms. I use Cloud9 linux environment with rails 4.2.0

Maybe some of you have ideas how to fix this? bellow is full error message.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150504-13714-unpe0g.rb 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=/usr/local/rvm/rubies/ruby-2.1.5/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:18: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. extconf failed, exit code 1 Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.5@rails4/gems/curb-0.8.8 for inspection. Results logged to /usr/local/rvm/gems/ruby-2.1.5@rails4/extensions/x86_64-linux/2.1.0/curb-0.8.8/gem_make.out An error occurred while installing curb (0.8.8), and Bundler cannot continue. Make sure thatgem install curb -v '0.8.8'` succeeds before bundling.

And here is my gemfile

source 'https://rubygems.org'

gem 'rails',        '4.2.0'
gem 'sass',         '3.4.13'
gem 'sass-rails',   '5.0.1'
gem 'uglifier',     '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks',   '2.3.0'
gem 'jbuilder',     '2.2.3'
gem 'sdoc',         '0.4.0', group: :doc
gem 'mailgun-rails', '~> 0.1.1'

group :development, :test do
  gem 'sqlite3',     '1.3.9'
  gem 'byebug',      '3.4.0'
  gem 'web-console', '2.0.0.beta3'
  gem 'spring',      '1.1.3'
end

group :test do
  gem 'minitest-reporters', '1.0.5'
  gem 'mini_backtrace',     '0.1.3'
  gem 'guard-minitest',     '2.3.1'
end

group :production do
  gem 'pg',             '0.17.1'
  gem 'rails_12factor', '0.0.2'
end
1
Can you post your gemfile?steve klein
Your bundle was fine before adding mailgun-rails? Maybe try taking the version off and seeing if it installs properly (with the latest version). If that works, you can always use bundle show to find the version and then set it in your gem file.steve klein
Thanks, yes the mailgun was the problem. Now, knowing that, maybe you have suggestions how can i use Mailgan services without gem?DanielsV
Is it for a simple contact form? On a recent project, I used gem mail-form,1.5 but I am sure there are other choices. Were you not able to get your bundle installed with the latest version of mailgun?steve klein
i made simplest contact form posible, but now am trying to make it work in production. Can't figure out those environment configurations.DanielsV

1 Answers

0
votes

Try removing your Gemfile.lock file located right next to the actual Gemfile and then running bundle install.

If that fails you could try dumping your current gemlist (e.g. imploding rvm) and installing them again.