Skip to content

Instantly share code, notes, and snippets.

@metaskills
Created October 12, 2010 14:00
Show Gist options
  • Save metaskills/622202 to your computer and use it in GitHub Desktop.
Save metaskills/622202 to your computer and use it in GitHub Desktop.
function my-rvm-prompt() {
rvmvg=$(~/.rvm/bin/rvm-prompt v g)
if [[ x$rvmvg != x ]]; then
color=$fg[yellow]
[ x$rvmvg != x ] && echo " %{$color%}$rvmvg$reset_color%}"
fi
}
@rmm5t
Copy link

rmm5t commented Oct 12, 2010

Ooh, I didn't know about the rvm-prompt modifier arguments. Updating my prompt now.

@metaskills
Copy link
Author

Lean and mean! Hey, were you a interested in traveling in Nov for that talk. Totally understand if your not. I forgot to ask too, you going to RubyConf? Funny, github gist chat :)

@rmm5t
Copy link

rmm5t commented Oct 12, 2010

Heh, I'll email.

@djbrowning
Copy link

As long as I've configured my .rvmrc files properly in each folder then I don't ever need to worry about which gemset. Set it up once and forget!

@metaskills
Copy link
Author

@djbrowning, done that! But if your developing things that need testing on different versions and you like have N terminal windows dedicated to that version in the same project, it get's really really handy. So much of what I do is not so rigid. Project default helps tho and I have them in every folder.

@rmm5t
Copy link

rmm5t commented Oct 12, 2010

Off topic, but for projects, I don't find gemsets to be of much use. Every project should have a Gemfile and install the project gems in a .gitignore'd directory. I really don't like the default behavior that bundle install has such that it installs gems to the current gem path. I like my project's gems to be installed under a gitignored vendor directory.

$ bundle install --path vendor
$ bundle package
$ echo 'vendor/ruby' >> .gitignore

All my project's gems are kept with the project itself (because of --path vendor), everyone has access to the cache (because of bundle package), and gemsets are barely needed.

@metaskills
Copy link
Author

Interesting, may do that on my HomeMarks or other adhoc projects. I've spent more of my time developing gems/libs, like the adapter where I'm not so sure that works well, tho I could be very wrong. Been there before :)

@rmm5t
Copy link

rmm5t commented Oct 12, 2010

Yeah, it should work for any ruby project. I use Gemfiles even for one-off spikes nowadays. The only hiccup, I suppose, is coordinating your Gemfile with your gemspec.

@rmm5t
Copy link

rmm5t commented Feb 10, 2011

You guy might have already seen my blog post from today, but for posterity sake, here's more detail about my usage of bundler and rvm for applications. This comment thread was actually what originally set the spark to write this post.

http://ryan.mcgeary.org/2011/02/09/vendor-everything-still-applies/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment