-
Notifications
You must be signed in to change notification settings - Fork 48
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
Explixitly disable global gemset #59
Comments
So let me be clear here: your Gemfile "requires mime-types 1.25"; but bundler doesn't recognize that, and doesn't do anything about that during |
hey @mrhead, it looks like this might be a duplicate of some other errors that we're seeing; but unless you reproduce the contents of your One special note: I'd appreciate it if you would just drop that "cute-speak". This is neither funny... nor cute in any way. And it isnt proper English. |
Hello @js, I am sorry I missed your previous reply. Regarding your note: I am sorry if I was offensive, or something, but I am not native english speaker and I have no idea what do you mean with "cute-speak". If there is anything wrong in my speak, please point it out directly so I can omit it in the future. Back to my issue. Here are my files:
And some additional output:
To be honest I am not sure how exactly it should work. But I would expect that all my gems are installed in my projects gems directory. Therefore I do not need to care if there are more versions of some gem for some other project. Right now if I just run
It fails because there are more versions in global gemset. For me it looks that it has issues with some newer version of But when I run Is this correct behaviour or not? As I said, I would expect to have everything in my local gemset so I do not need to care about content of global gemset... Also if there is any additional output which you need do not hesitate to ask for it. Many thanks |
thanks, @mrhead . So I get that you dont speak English natively. But to point out the issue that I had a problem with: using 'x' instead of 'c' in various places in your first post... The subject, for instance: 'Explixitly disable ...' And then even in a command ( Now regarding the problem: thanks for the info - including that additional info that you thoughtfully volunteered as well. It seems like this is a problem that a few others have encountered as well. Can you give me the output for the following? 1. |
hey @mrhead , were you formerly using |
Hello @jf , I am sorry but meanwhile I've removed gemsets from my project and I did not save it (not even to its own branch). I've tried Feel free to close this issue if you do not have enough information. Many thanks for your time. |
+1 for this |
+1 for this |
I would like the option to disable the global gemset because my local gemsets are specific to the local project, I do not want global gems leaking into that local environment. I commonly install gems providing CLI tools into the global ruby install which are not generally local project development related. Everything the project requires will be installed into the local gemset. |
+1 from me (I really, really second this feature) I have exactly the same situation as @tombell Edited comment to be in line with my commit: rbenv-gemset is a tool for clearly defined gemsets, so no gemset should be automagically "enforced" on the user. If the user really wants the global gemset included, it's easy to do so by including 'global' gemset in either the .rbenv-gemsets file or in the RBENV_GEMSETS env variable. rbenv-gemset can be used to keep seperated clean gem environments inside of projects, while having installed global gems for day to day work. Automatically including the global gemset "pollutes" the clean project specific gemsets. Feel free to use my code. I can also create a pull request if you want. |
Ok, folks, I've mentioned this before (in another issue), but for the sake of everybody, I will repeat the history of things as far as how this I personally hate any sort of enforcement as well; so I get that argument. However, this was before my time, and now that the feature has been introduced, and I would like to give a special shoutout to @neovatar, btw. Thanks for taking the initiative to submit a patch! I was just about to call for one.... |
Good Idea, but I would do it the other way around (actually keeping it similar to the way it was): If you need the global gemset, specify a gemset (like I would vote for excluding the global gemset by default and giving an option to include it (like putting a 'global' line into the .rbenv-gemsets file). Then update the documentation, to make it clear how to include the global gemset. I can do a pull request for the updated doc if you want. I get your concern about upgraders, which is what a good maintainer always needs to do. But introducing a new "special" gemset to remove the global one is no a very good solution in my opinion. It would add unneeded complexity to usage and to code. Side note: I also commented on your concerns because I removed the Jruby workaround, it is not needed anymore, I did test with a manually installed Jruby 1.7.11. I am attaching a pull request with my updated code, just see it as a possible solution you could use. |
Ok, let's address the issue of the |
I do not have an actual gemset named |
Ok. There are a few things that I'll need to clarify:
Is anybody having any conflicts with these gems? |
ad 1.: Ok, I thought that global did reference the default gem path but the code show that it actually uses a ad 2.: I really disagree here, taken from the Docs:
ad 3.: I did not think of rubunius, because I don not use it. I will test my patch against it. Ok, I am seeing, that my patch does change the behaviour of the original |
You've misunderstood what In addition, here's a 4th point to ponder: Can |
Ok I have redone the whole thing and added the possibility to use an Pullrequest: #66 What do you think of this solution? |
hmmm... do we really need to have another dot file? is this complicating things a bit? |
I thought about this for a while, but it seems it is the best option - even more if you want to stay backward compatible. With the .rbenv-gemset.options file you could easily put the .rbenv-gemset-options file in your home dir and all projects below your home dir would use these extended settings. I am already using this in production right now. |
The |
Yes, but .rbenv-gemsets only has a very simple format: Each line represents a gemset. If you would add some special options to this file, it would not be backwards compatible. Would that be a change that you want to do? I didn't want to put pressure on you, when I said that I am using the code in production and I do not want to force it on either you or the rest of the rbenv-gemset users. I was just suggesting a solution to an issue some people are having. I am sorry, if I did leave another impression. Do you have an alternate solution to this problem? |
Another idea: rbenv-bundler uses a directory to store some plugin states, e.g.:
(https://github.com/carsomyr/rbenv-bundler/blob/master/bin/rbenv-bundler) You think that would be a better way to store rbenv-gemset settings? It would not use another dot file and it would be be backwards compatible. I can create a pull request, but I like to hear your opinion first. |
Hey @neovatar , sorry about the delay. I am of the opinion that we are overcomplicating things too far in advance. We have the one If you want to submit a patch, I'd appreciate it, but pls do so with the goal of adhering to the format I've stated. My thoughts (and I would really like for others to chime in here as well) are to go with the literals |
I still think a dedicated config file for those "special" options would be a good way to go, but I understand your single file policy. I will try too cook up something the next days. |
Hi @neovatar I think i like your implementation of sandboxing gem on each project is pretty good. Do you have working fork on this ? |
hey sorry folks and @neovatar. My main system went down for a while (it's still down, actually), and I've had to take care of some other things. I'll try to comment very quickly in a short while. |
Welcome back @jf! I know your pain. My main rigs GFX card burned out yesterday... I read your comments and updated the code.
|
Sorry for the number of references, I will create a pull request to make code review more easy for you. Pull request: #70 |
Duplicating a comment I made for https://github.com/neovatar/rbenv-gemset/commit/697fedd7c09dd3cae1b8ff10084c2ccbe1a5be91: I had hoped that u could have done better than this. I dont know what this is, but surely u could have known (after all, this is your patch) that simply deleting this would not do? (because the rest of your patch still called this code) I was waiting to see how long it would take before you would realize this.... |
Looks like this issue isn't going to be solved, I'm just going to maintain my own fork with the global stuff removed. The whole idea of gemsets is separation of gems, leaking global gems into these sets completely defies the point of this plugin to begin with. |
If anyone subscribed to this issue still wants to disable global gems in local gemsets, I've forked and create a branch in the fork for commenting out the stuff that does the global stuff. https://github.com:tombell/rbenv-gemset I'll end up merging upstream changes back into my fork, while keeping the global stuff commented out. At the end of the day it appears like it is going to be simpler to actively maintain a fork than reach some compromise for the "official" copy. |
My purpose in using rbenv-gemset is to have a clean set of gems in the project directory installed specifically for the project. My purpose is not to overlay in the project gems additional to some set installed elsewhere (global or otherwise). I'm using the @tombell fork. (In spite of the profane name, which about sums it up anyway.) You can pick on me for my housecleaning of gemsets in parent directories; but, hey software can be hard enough without having to run down development environment quirks or differences. The fork allows me to cleanly nail down the gems in use for the project without any fuss or worry. +1 Thank you, Tom. |
Yup, @dlovellrw. I've remained silent for a long time but... I will work on it this weekend. |
Thanks @jf . We appreciate your hard work. |
So guys, add "-global" to your gemsets file, and you won't have any gems from the "global" gemset anymore. This may become the default for the future, but we'll see.... |
@jf Thanks for helping out here. I think I'm totally out of my depth here but, what is the purpose of having a local gemset if the "global" set of gems get used anyway? i.e. and then I must be missing something. Sorry if this is not making sense |
Oh yes my project specific .rbenv-gemsets file
Am I going "bonkers"? I can not install any of the gems that are already installed in global. I want to modify a gem and test it without breaking all of the other projects. Isn't that what the whole idea of gemsets would be for? Surely I must be missing something. Can anyone set me straight on this? Gemsets seem like a good concept. |
hi @mrentz, sorry for the (super!) late reply. I only just noticed this.
(NOTE: please read #59 (comment) first so that we are both using the same terms the same way. What you call "global" is actually the standard gem path (you can even think of it as a gem set!) that comes set up when you install ruby. This just comes by default when you install ruby; and is not (again, see #59 (comment)) the
To answer your question, you should be using
(again, note that this isn't exactly "global", but the standard gem path that comes set up when you install ruby) You actually can. If you temporarily comment out your gemsets in |
Is it possible to use just local gemset?
I have this issue:
When I run
bundle install
it writes that everything is installed. But obviously it is installed just in the global gemset.I think that it should be possible to disable global gemset somehow.
bundle exex rspec
works for me, but I think that goal of using gemsets is to avoid it (and that is my goal).Or is there some other solution to this issue?
The text was updated successfully, but these errors were encountered: