sudo add-apt-repository ppa:chris-lea/node.js
When typing that out in version 15.10, I got an error.
I read two forum posts suggesting to use 14.04 because 15.10 wasn't supported.
sudo add-apt-repository ppa:chris-lea/node.js
Fetching: nokogiri-1.6.7.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/home/user/.rvm/rubies/ruby-2.2.4/bin/ruby -r ./siteconf20151223-26597-j3i7to.rb extconf.rb
checking if the C compiler accepts ... *** 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=/home/user/.rvm/rubies/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
--help
--clean
/home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:571:in `block in try_compile'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:522:in `with_werror'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:571:in `try_compile'
from extconf.rb:80:in `nokogiri_try_compile'
from extconf.rb:87:in `block in add_cflags'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/mkmf.rb:619:in `with_cflags'
from extconf.rb:86:in `add_cflags'
from extconf.rb:336:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /home/user/.rvm/gems/ruby-2.2.4/gems/nokogiri-1.6.7.1 for inspection.
Results logged to /home/user/.rvm/gems/ruby-2.2.4/extensions/x86_64-linux/2.2.0/nokogiri-1.6.7.1/gem_make.out
sudo apt-get install libgmp-dev
...or...sudo apt-get install libgmp3-dev
Many of the suggestions I found on a few different forum posts stated that I needed to run...sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
rvm install 2.2.3
rvm list remote
rvm info
sudo apt-get install autoconf automake bison build-essential curl git-core libapr1 libaprutil1 libc6-dev libltdl-dev libreadline6 libreadline6-dev libsqlite3-0 libsqlite3-dev libssl-dev libtool libxml2-dev libxslt-dev libxslt1-dev libyaml-dev ncurses-dev nodejs openssl sqlite3 zlib1g zlib1g-devNote: Do not copy and paste the above into your terminal window. Type it all out.
curl -L get.rvm.io | bash -s stable
type rvm | head -1