Installing rails error: Operation not permitted
<p>I am literally new to Ruby. This is my first day and naturally it starts with installing it on my machine.</p>

<p>I am using Mac os El Capitan. It already shipped with ruby so I just updated it, installed the rvm &amp; gem and tried to install rails using the following commands:</p>

<pre><code>rvm get head
sudo gem update --system
sudo gem install rails
</code></pre>

<p>The last command (installing rails) is giving me the following error:</p>

<pre><code>ERROR:  While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/rackup
</code></pre>

<p>Any idea what is it and how to fix it? I have found couple of questions on stackoverflow with similar, but not the same error, but I didn't even understand the answers. Again I am really a novice here.</p>

<p><strong>Edit:</strong></p>

<p>I keep getting comments that this is a duplicate question. However it is not giving me the same error as in the other questions. 
Please if anyone knows what is this error about, or whether it's really the same error, explain why, otherwise I don't see a reason why you should mark the question as duplicate without understanding the error message. </p>