Вопрос

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.

Это было полезно?

Решение 2

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

Другие советы

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top