which version of gem runs depends on if I sudo or not

this is weird guys:

david@triton:/usr/bin$ /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/gem  -v
1.8.10
david@triton:/usr/bin$ sudo /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/gem  -v
1.3.5

Now I need to be using version 1.8.10 but I also need sudo permissions.

What can I do?

Answers


Please don't use sudo if you are using RVM You do not need to access rubies like this by moving to the exact path. Write following at your shell rather.

rvm use 1.9.2
rvm gemset create <gemsetname>
<install any required gems you want to use without sudo>
rvm gemset use <gemsetname>

After that any gems you will use would be according to the desired version without doing sudo


To use sudo with RVM you should use:

$ rvmsudo command

Need Your Help

js singleton - how to avoid accessing class members via the namespace

javascript singleton this javascript-namespaces

I'm trying to improve my Javascript coding style and have been reading that it's good to namespace stuff.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.