I am trying to install rails on ruby 2.3.1.
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
Ruby installed.
$ rvm -v
rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
RVM exists.
$ gem install rails
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
current directory: /usr/local/rvm/gems/ruby-2.3.1/gems/nokogiri-1.7.0.1/ext/nokogiri
/usr/local/rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170227-6774-1l4uc6c.rb extconf.rb
Cannot allocate memory - /usr/local/rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170227-6774-1l4uc6c.rb extconf.rb 2>&1
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.3.1/gems/nokogiri-1.7.0.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.3.1/extensions/x86_64-linux/2.3.0/nokogiri-1.7.0.1/gem_make.out
When I call gem list, I don't see nokogari nor rails. $ gem list
*** LOCAL GEMS ***
...
minitest (5.8.3)
net-telnet (0.1.1)
pg (0.19.0)
power_assert (0.2.6)
psych (2.0.17)
rack (2.0.1)
rack-test (0.6.3)
raindrops (0.17.0)
rake (10.4.2)
rdoc (4.2.1)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
test-unit (3.1.5)
...
I donot know what is wrong.