Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nave not switching version when usemain used #25

Closed
remy opened this issue Nov 7, 2011 · 4 comments
Closed

nave not switching version when usemain used #25

remy opened this issue Nov 7, 2011 · 4 comments

Comments

@remy
Copy link

remy commented Nov 7, 2011

I'm not 100% sure this is a bug or a screw up in how I'm using nave, but:

I've used nave usemain latest (which puts me on 0.6.0). When I run nave use 0.4.12 it fires up a new shell, but when I run node -v it returns 0.6.0.

I expected that when I switch to the shell, I could enter a node repl and it would be under 0.4.12 (in this example).

Like I said, I suspect I'm doing something wrong, so please do set me on my way!

Ta.

@isaacs
Copy link
Owner

isaacs commented Nov 7, 2011

What does echo $PATH output in the 0.4.12 subshell? Are you perhaps setting the PATH explicitly in your .bashrc so that nave's setting gets overwritten?

@isaacs isaacs closed this as completed Nov 7, 2011
@remy
Copy link
Author

remy commented Nov 7, 2011

echo $PATH outputs (but I've split on :):

/usr/local/mysql/bin
/usr/local/git/bin
/usr/local/mysql/bin
/usr/local/share/npm/bin
/usr/local/sbin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin

And I know that node is sitting in /usr/local/bin/ with version 0.6.0 - but that was installed from nave usemain latest

Any suggestions on tweakage?

@isaacs
Copy link
Owner

isaacs commented Nov 7, 2011

Check your .bashrc or .profile or .bash_profile. You've got some line that's doing PATH=/usr/local/mysql/bin:..... Make it something like PATH=$PATH:/usr/local/mysql/bin... instead. Nave injects the PATH environment variable to set the version of node that gets used, but your profile is clobbering i.t

@remy
Copy link
Author

remy commented Nov 7, 2011

That did the trick - cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants