The /bin/setup command fails with the following error:
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/divyendu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/curses-1.0.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/divyendu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/curses-1.0.2 for inspection.
Results logged to
/home/divyendu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/curses-1.0.2/gem_make.out
An error occurred while installing curses (1.0.2), and Bundler cannot continue.
Make sure that `gem install curses -v '1.0.2'` succeeds before bundling.
Further, the log file has the following error, I have pasted it partially, let me know if I should paste the full log file:
*** 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.
I tried this with almost all versions of ruby ranging from 1.9.x to 2.3.x
I understand that the issue is with installation of curses gem.
https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-14-04 | I tried other ways as well, this is where I am at now.bin/setupLooks like you are missing some libraries the gem needs to build with native extensions. For curses i think you could try
sudo apt-get install libncurses5-dev libncursesw5-dev
Thanks @idabmat, that sounds right.
Thanks @idabmat
I was able to build trix post running sudo apt-get install libncurses5-dev libncursesw5-dev
Is there a way to make the gem installation throw a better error ?
I haven't worked much with ruby and the error message didn't help either.
Most helpful comment
Looks like you are missing some libraries the gem needs to build with native extensions. For curses i think you could try
sudo apt-get install libncurses5-dev libncursesw5-dev