rbenv Your user account isn't allowed to install to the system Rubygems

 

Clone一個新Rails項目到Mac, bundle install 的時候遇到下面的提示ruby

 

Fetching source index from http://rubygems.org/ Your user account isn't allowed to install to the system Rubygems. You can cancel this installation and run: bundle install --path vendor/bundle to install the gems into ./vendor/bundle/, or you can enter your password and install the bundled gems to Rubygems using sudo. Password:this

 

也就是說,rbenv 要往你係統的自帶Ruby裏面安裝gem.spa

gem list | grep bundler

用上面的命令看看你是否經過rbenv安裝了bundler. 若是沒有那就對了,因此只能去找系統的ruby了,那麼你可能不但願這樣。blog

因此解決辦法已經明瞭:hash

gem install bundler
rbenv rehash
相關文章
相關標籤/搜索