How to install a gem via user account?

March 25, 2015 3.4k views
Ruby on Rails

I am logged in as user. I gave all root privileges to user. Now I am doing bundle install. It is breaking by saying “Make sure that gem install nokogiri before bundling. Now when I try to install by gem install nokogiri , it says permission denied. When I try it with sudo gem install nokogiri, then it says "sudo: gem: command not found”. How can I install this gem?

2 comments
1 Answer

This question was answered by @anishajayan:

swapon solved this issue. I followed this- “https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04

View the original comment

by Etel Sverdlov
Linux swaps allow a system to harness more memory than was originally physically available. Here's how to set up a linux swap file on Ubuntu 12.04
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!