1

I am trying to set myself up on a mac to learn Ruby on Rails, however I seem to be having some problems. If I try to run commands such as ./script/server, i get this:

Rails requires RubyGems >= 0.9.4 (you have 0.9.2). Please gem update --system and try again.

When I run "gem update.." I get this:

Updating RubyGems... Attempting remote update of rubygems-update ERROR: While executing gem ... (Errno::EACCES) Permission denied - /opt/local/lib/ruby/gems/1.8/cache/rubygems-update-1.3.0.gem

Cœur
  • 37,241
  • 25
  • 195
  • 267
Rodreegez
  • 576
  • 5
  • 15

2 Answers2

5

got it.

sudo gem update --system

Rodreegez
  • 576
  • 5
  • 15
0

Starting with El Capitan, Apple prevents user applications to modify /usr/bin for security reasons. So better install/update rubygems in the recommended folder, /usr/local/bin:

sudo gem update -n /usr/local/bin --system

(recommendation taken from https://stackoverflow.com/a/39928447/1033581)

Cœur
  • 37,241
  • 25
  • 195
  • 267