Confused with $PATH value for Ruby gems and for npm
up vote
0
down vote
favorite
The following Ruby gems installation way used to work back in the day:
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
export PATH=/usr/local/bin:$PATH
launchctl setenv PATH “/usr/local/bin:$PATH”
brew install ruby
gem install jekyll
But now on the last step, I get:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
I have tried this solution - https://gist.github.com/DirtyF/5d2bde5c682101b7b5d90708ad333bf3. And it sort of worked but now my $PATH
is messed up. echo $PATH
returns - /Users/username/.rbenv/shims:/Users/username/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
.
Is that the expected $PATH
? If not, how can I correct it?
ruby path rubygems homebrew
add a comment |
up vote
0
down vote
favorite
The following Ruby gems installation way used to work back in the day:
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
export PATH=/usr/local/bin:$PATH
launchctl setenv PATH “/usr/local/bin:$PATH”
brew install ruby
gem install jekyll
But now on the last step, I get:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
I have tried this solution - https://gist.github.com/DirtyF/5d2bde5c682101b7b5d90708ad333bf3. And it sort of worked but now my $PATH
is messed up. echo $PATH
returns - /Users/username/.rbenv/shims:/Users/username/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
.
Is that the expected $PATH
? If not, how can I correct it?
ruby path rubygems homebrew
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
The following Ruby gems installation way used to work back in the day:
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
export PATH=/usr/local/bin:$PATH
launchctl setenv PATH “/usr/local/bin:$PATH”
brew install ruby
gem install jekyll
But now on the last step, I get:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
I have tried this solution - https://gist.github.com/DirtyF/5d2bde5c682101b7b5d90708ad333bf3. And it sort of worked but now my $PATH
is messed up. echo $PATH
returns - /Users/username/.rbenv/shims:/Users/username/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
.
Is that the expected $PATH
? If not, how can I correct it?
ruby path rubygems homebrew
The following Ruby gems installation way used to work back in the day:
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
export PATH=/usr/local/bin:$PATH
launchctl setenv PATH “/usr/local/bin:$PATH”
brew install ruby
gem install jekyll
But now on the last step, I get:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
I have tried this solution - https://gist.github.com/DirtyF/5d2bde5c682101b7b5d90708ad333bf3. And it sort of worked but now my $PATH
is messed up. echo $PATH
returns - /Users/username/.rbenv/shims:/Users/username/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
.
Is that the expected $PATH
? If not, how can I correct it?
ruby path rubygems homebrew
ruby path rubygems homebrew
edited 15 hours ago
Holger Just
35.2k97998
35.2k97998
asked 18 hours ago
alljamin
499526
499526
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Don't install ruby with homebrew if you are going to use a ruby version manager, i.e. rbevn.
I would at this point recommend brew uninstall ruby
Then use rbenv if you already have it working to install your ruby version.
But if you are confused and not sure what you're doing, you might wanna consider using RVM instead of RBENV as the install/setup is easier.
If so see How do you uninstall rbenv on OSX?
Then see https://rvm.io/rvm/install
Looking at your gist
echo "export PATH=$HOME/gems/bin:$PATH" >> ~/.bashrc
You may need to edit your ~/.bashrc
and remove that export line
You will probably want to close and reopen your terminal before doing any of the above. Anything that makes changes to ~/.bashrc
won't take effect until you restart your terminal
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Don't install ruby with homebrew if you are going to use a ruby version manager, i.e. rbevn.
I would at this point recommend brew uninstall ruby
Then use rbenv if you already have it working to install your ruby version.
But if you are confused and not sure what you're doing, you might wanna consider using RVM instead of RBENV as the install/setup is easier.
If so see How do you uninstall rbenv on OSX?
Then see https://rvm.io/rvm/install
Looking at your gist
echo "export PATH=$HOME/gems/bin:$PATH" >> ~/.bashrc
You may need to edit your ~/.bashrc
and remove that export line
You will probably want to close and reopen your terminal before doing any of the above. Anything that makes changes to ~/.bashrc
won't take effect until you restart your terminal
add a comment |
up vote
0
down vote
Don't install ruby with homebrew if you are going to use a ruby version manager, i.e. rbevn.
I would at this point recommend brew uninstall ruby
Then use rbenv if you already have it working to install your ruby version.
But if you are confused and not sure what you're doing, you might wanna consider using RVM instead of RBENV as the install/setup is easier.
If so see How do you uninstall rbenv on OSX?
Then see https://rvm.io/rvm/install
Looking at your gist
echo "export PATH=$HOME/gems/bin:$PATH" >> ~/.bashrc
You may need to edit your ~/.bashrc
and remove that export line
You will probably want to close and reopen your terminal before doing any of the above. Anything that makes changes to ~/.bashrc
won't take effect until you restart your terminal
add a comment |
up vote
0
down vote
up vote
0
down vote
Don't install ruby with homebrew if you are going to use a ruby version manager, i.e. rbevn.
I would at this point recommend brew uninstall ruby
Then use rbenv if you already have it working to install your ruby version.
But if you are confused and not sure what you're doing, you might wanna consider using RVM instead of RBENV as the install/setup is easier.
If so see How do you uninstall rbenv on OSX?
Then see https://rvm.io/rvm/install
Looking at your gist
echo "export PATH=$HOME/gems/bin:$PATH" >> ~/.bashrc
You may need to edit your ~/.bashrc
and remove that export line
You will probably want to close and reopen your terminal before doing any of the above. Anything that makes changes to ~/.bashrc
won't take effect until you restart your terminal
Don't install ruby with homebrew if you are going to use a ruby version manager, i.e. rbevn.
I would at this point recommend brew uninstall ruby
Then use rbenv if you already have it working to install your ruby version.
But if you are confused and not sure what you're doing, you might wanna consider using RVM instead of RBENV as the install/setup is easier.
If so see How do you uninstall rbenv on OSX?
Then see https://rvm.io/rvm/install
Looking at your gist
echo "export PATH=$HOME/gems/bin:$PATH" >> ~/.bashrc
You may need to edit your ~/.bashrc
and remove that export line
You will probably want to close and reopen your terminal before doing any of the above. Anything that makes changes to ~/.bashrc
won't take effect until you restart your terminal
answered 15 hours ago
lacostenycoder
3,35111225
3,35111225
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237532%2fconfused-with-path-value-for-ruby-gems-and-for-npm%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password