Reputation: 73
I'm trying to deploy Fedena 2.3 (projectfedena.org) on Ubuntu 16.04, and its built with Ruby 1.8.7 on Rails 2.3.5. I've been able to install it and run with script/server, but now I'm trying to deploy it using Puma+Nginx and as soon as I run gem install puma 3.6.2 (any version above it requires Ruby > 1.8.7), it gives me this error. Does anyone know how i can fix it?
user@server:~/development$ gem install puma -v 3.6.2
Building native extensions. This could take a while...
ERROR: Error installing puma:
ERROR: Failed to build gem native extension.
/home/user/.rvm/rubies/ruby-1.8.7-head/bin/ruby extconf.rb
checking for BIO_read() in -lcrypto... yes
checking for SSL_CTX_new() in -lssl... yes
checking for openssl/bio.h... yes
creating Makefile
make
gcc -I. -I. -I/home/user/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/x86_64-linux -I. -DHAVE_OPENSSL_BIO_H -fPIC -O2 -fno-tree-dce -fno-optimize-sibling-calls -fPIC -c http11_parser.c
gcc -I. -I. -I/home/user/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/x86_64-linux -I. -DHAVE_OPENSSL_BIO_H -fPIC -O2 -fno-tree-dce -fno-optimize-sibling-calls -fPIC -c puma_http11.c
gcc -I. -I. -I/home/user/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/x86_64-linux -I. -DHAVE_OPENSSL_BIO_H -fPIC -O2 -fno-tree-dce -fno-optimize-sibling-calls -fPIC -c mini_ssl.c
mini_ssl.c:4:26: fatal error: ruby/version.h: No such file or directory
#include <ruby/version.h>
^
compilation terminated.
make: *** [mini_ssl.o] Error 1
Gem files will remain installed in /home/user/.rvm/gems/ruby-1.8.7-head/gems/puma-3.6.2 for inspection.
Results logged to /home/user/.rvm/gems/ruby-1.8.7-head/gems/puma-3.6.2/ext/puma_http11/gem_make.out
Upvotes: 0
Views: 3545
Reputation: 3137
The last puma version to officially support Ruby 1.8.7 is 2.16.0
https://github.com/puma/puma/blob/master/History.md#2160--2016-01-27
https://github.com/puma/puma/blob/master/History.md#300--2016-02-25 states
Ruby pre-2.0 is no longer supported
Upvotes: 1
Reputation: 3515
Running
gem install puma -v 3.4.0
works for my ruby 1.8.7. Try installing this puma version instead
Upvotes: 0