NaN1488 / sublime-gem-browser

Gem browser for Sublime Text
113 stars 16 forks source link

Support for RVM with gemset #5

Closed ricardokrieg closed 11 years ago

ricardokrieg commented 11 years ago

Hi, my changes add support for rvm with gemset. Please take a look, maybe you want to merge them.

Thanks.

Ivor commented 11 years ago

Wow, this will be great! Thanks for the work!

bbonamin commented 11 years ago

Thank you for this =)

NaN1488 commented 11 years ago

Hi @ricardokrieg, What a nice surprise! we will test it in a couple of machines before to merge the fix. If it works, we will merge it the next week.

Thanks!!

ricardokrieg commented 11 years ago

:yum: Its not funny to keep running this

sublime_text `bundle show [gem]`

But keep in mind that my code only works if the project has the .rvmrc file. I tried using rvm-prompt to set the current gemset, but it doesn't work.

I'm trying to find a way to get the gemset without having the .rvmrc.

ricardokrieg commented 11 years ago

I dont know if its just my case, but for me I guess there's no way to get the current gemset without having a .rvmrc file in the project.

This is because I use multiple terminals and in each terminal I have a gemset loaded. And I have multiple instances of sublime running, and in all they return the same gemset (that for the first instance).

A solution could be to use the command rvm current (when there's no .rvmrc), but it can returns the wrong gemset.

bbonamin commented 11 years ago

I'm having trouble trying to get this to work on ubuntu with RVM (which os are you using?)

If I don't have a .rvmrc file I get the error:

'e' is not defined (line 28)

If I have a .rvmrc I still get gems not found =(

ricardokrieg commented 11 years ago

Hi, sorry about the 'e' error (it is a syntax error =P). I'll make a commit to fix this.

But if you have .rvmrc and get gems not found, maybe you didn't run bundle install. Can you confirm this?

bbonamin commented 11 years ago

You're right.. as I'm testing this on a VM I didn't run bundle install :P.. I'm testing again

bbonamin commented 11 years ago

It works great, but now we have two pull request with the same functionality, what do you think of #7 ?

ricardokrieg commented 11 years ago

@calmyournerves solution is great! I tested in some projects and everything was fine. Its better to merge his pull request :yum:

bbonamin commented 11 years ago

Thanks for the honest feedback. I'll merge his pull request. Great job though! Both of you got it to work.