Skip to content

Update usage in README to use rbenv-gemset command #76

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

Closed
wants to merge 3 commits into from

Conversation

ardeshirj
Copy link
Contributor

Update usage to use the rbenv-gemset command instead of creating files manually. PR #27

@jf
Copy link
Owner

jf commented Dec 15, 2015

I like this writeup, but I have a few problems with this:

  1. you're removing valuable info about the content of the .rbenv-gemsets file. I do not intend for people not to know how to edit and use the .rbenv-gemsets file directly.
  2. you've also removed info about a very valuable and useful feature: project gemsets. Valuable and useful info should not be removed!
  3. you've got some typos in there. Please fix them.

@jf
Copy link
Owner

jf commented Dec 15, 2015

One other quick question. I think you meant to say this PR is supposed to help address issue #27, right? As opposed to "PR #27"?

@ardeshirj
Copy link
Contributor Author

To clarify my understanding about the content of the .rbenv-gemsets file, there are two major cases:

  • By default the rbenv-gemset init command will create the primary gemset, which is the project name, and it will initialize the directory under the /usr/local/var/rbenv/versions/$RUBY_VERSION/gemsets/ directory
  • We can modify the content of .rbenv-gemsets so the gems will be installed in the project directory (for example .gems or ./gems)

Also I was wondering if it would be nicer to demonstrate the usage instead of the write up. What do you think about changing it to:

cd my-project

# Setup gemset for your project. Also will create a .rbenv-gemset file in the current directory.
# Please note this will create gemset under the $RUBY_VERSION.
rbenv-gemset init

# To create a gemset under a specific ruby version you can use the following command:
rbenv-gemset create [version] [gemset]

# You can see the existing gemset by using the following command:
# This should include the most recent gemset you just created.
rbenv-gemset list

# You can delete the gemset with the following command:
rbenv-gemset delete  [version] [gemset]

I will add the notes about content of .rbenv-gemsets file here.

And yes I meant the issue #27 not the pull request.

@jf
Copy link
Owner

jf commented Feb 7, 2016

Overall, your doc is good for a newbie, but as a note, me being me, I'd like to have a "supergeek" version as well (I'll take care of that, don't worry; this is just a reminder to self).

Some specific notes:

  • the "two major cases" you mention are correct.
  • I think your idea of demonstrating usage is actually great! I like it!
  • @Lukeswart pointed out that you use rbenv-gemset (with the dash) instead of rbenv gemset. It should be the latter.
  • The path that you give, /usr/local/var/rbenv/versions/$RUBY_VERSION/gemsets/YOUR_PROJECT_NAME/gems is homebrew-specific. That needs to change. Either remove it... or else generalize it (use "$RBENV_ROOT")

Lastly, are you able to update your patch with reference to the latest code? Thanks!

@ardeshirj
Copy link
Contributor Author

I have updated the usage section with the demonstration example, and I included the those two major points.

In my case both rbenv gemset and rbenv gemset works fine (OSX 10.11, homebrew), however I updated the demonstration to use rbenv gemset instead. The help command (rbenv gemset) still using rbenv-gemset in the output. I will leave this one for you in case you want to change it.

Let me know if there is anything else you want me to change or add.

Cheers!

@jf
Copy link
Owner

jf commented Jul 18, 2016

hi @ardeshirj , sorry about the long wait. I'm just going through the modified README now. I do see some things that need to be changed... but I think to make it easier for you, what I'll do is pull this into a separate branch, edit it there, and then merge the final result back. I trust this is ok with you? I'll do this in a couple of days unless you have a problem.

@jf
Copy link
Owner

jf commented Jul 18, 2016

I'm struggling a bit with the following 2 blocks of text, btw:

By default the rbenv-gemset init command will create the primary gemset, which is the project name, and it will initialize the directory under the $(rbenv prefix "$RBENV_VERSION")/gemsets/$RBENV_GEMSET. If you are using the bundler it should install the gems and the dependencies in above path.

You can modify the content of .rbenv-gemsets so the gems will be installed in the project directory (for example .gems or ./gems)

These are my thoughts so far. On the one hand, I appreciate the information. On the other, I don't know if this may be a bit too much for this section (I'm considering this section the "superfantastic somebody-should-have-written-this-down-a-long-time-ago bare minimum all-you-need-to-know section").

Also:

  • rbenv gemset init will, if successful, already let the user know of the gemset name
  • technically, there is no actual $RBENV_GEMSET variable (so an actual $(rbenv prefix)/gemsets/$RBENV_GEMSET path will not work)

All in, though, great writeup, and I appreciate you working with me on this. Thanks for stepping in to do this!

jf added a commit that referenced this pull request Jul 23, 2016
@jf jf closed this Jul 23, 2016
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

Successfully merging this pull request may close these issues.

2 participants