Reputation: 335
So when I run:
$ rails new mywebapp
I get the following error:
Your user account isn't allowed to install to the system Rubygems.
This is despite installing rbenv via Homebrew.
I have added the following to ~/.bash_profile
eval "$(rbenv init -)"
And installed a version of Ruby.
Running:
$ echo $PATH
Gives me:
/Users/myusername/.rbenv/shims:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
Im not sure where to go from here. Hoping someone can help.
Many thanks.
Upvotes: 2
Views: 2247
Reputation: 2683
Agreeing with Dylan on the problem, I think that the best solution is to set explicitly an Rbenv global version using rbenv global 2.1.1
And then reinstalling bundler on that version.
gem uninstall bundler
gem install bundler
rbenv rehash
This worked good for me. Hope it helps.
Upvotes: 3
Reputation: 124469
Based on the comments to the original question, the answer was that the system-installed rails
executable was being used instead of the rbenv version. The fix was to run:
gem install rails
Upvotes: 2