jkrall / analytical

Gem for managing multiple analytics services in your rails app.
MIT License
381 stars 93 forks source link

Updated .rvmrc file and a little bit of documentation #61

Closed gyarra closed 11 years ago

gyarra commented 11 years ago

The .rvmc file didn't create a gemset, so I updated the file based on the latest instructions on the RVMC site. Pretty simple.

Also made one minor edit to README documentation because I was initially confused.

freerobby commented 11 years ago

@gyarra Your .rvmrc file is correct according to the rvm docs, but when I use it and cd into the directory, I get:

robby@local:~/workspace/personal cd analytical/
==============================================================================
= NOTICE                                                                     =
==============================================================================
= RVM has encountered a new or modified .rvmrc file in the current directory =
= This is a shell script and therefore may contain any shell commands.       =
=                                                                            =
= Examine the contents of this file carefully to be sure the contents are    =
= safe before trusting it! ( Choose v[iew] below to view the contents )      =
==============================================================================
Do you wish to trust this .rvmrc file? (/Users/robby/workspace/personal/analytical/.rvmrc)
y[es], n[o], v[iew], c[ancel]> y
/Users/robby/.rvm/bin/bundle
ERROR: Gem bundler is not installed, run `gem install bundler` first.
[1]+  Done                    ( if ! command -v bundle; then
    gem install bundler;
fi; bundle | grep -v 'Using' | grep -v 'complete' | sed '/^$/d' )

It looks to me like rvm somehow keeps the bundle executable around even when the gem is not installed:

robby@local:~/workspace/personal/analytical(master) command -v bundle
/Users/robby/.rvm/bin/bundle
robby@local:~/workspace/personal/analytical(master) bundle
ERROR: Gem bundler is not installed, run `gem install bundler` first.

This seems like a bug in RVM to me, and I imagine a clean install/upgrade would fix it, but I'm hesitant to pull this in if it affects others on older version. @jkrall Any thoughts?

gyarra commented 11 years ago

Hi freerobby, I couldn't find a way to recreate the behavior you're seeing, but I think this should be a fix. It's only slightly different from the RVM suggested structure.

I should mention the reason I think this is a worthwhile push is because the previous .rvmrc file didn't set up the gemset in my environment. So not just being pedantic or something - I think this would be useful for future devs.

Thanks!

freerobby commented 11 years ago

@gyarra Can you try one thing quickly and tell me if it works?

Remove your local analytical gemset and .rvmrc file, and create an .rvmrc file with just this:

rvm 1.8.7-p174@analytical --create

Then leave the directory and cd into it. Does that accomplish what you're looking for?

gyarra commented 11 years ago

This command creates the gemset but then does nothing with it. One would still have to manually enter the "bundle" command.

A main purpose of the .rvmrc file is to streamline development so that cd'ing into a directory automatically updates the gemset, using bundle, in addition to creating the gemset.

At the same time, I guess this particular change isn't terribly important. People set up their environments in different ways, and most open source projects don't bother having an .rvmrc file.

On Thu, Jan 31, 2013 at 11:15 PM, Robby Grossman notifications@github.comwrote:

@gyarra https://github.com/gyarra Can you try one thing quickly and tell me if it works?

Remove your local analytical gemset and .rvmrc file, and create an .rvmrc file with just this:

rvm 1.8.7-p174@analytical --create

Then leave the directory and cd into it. Does that accomplish what you're looking for?

— Reply to this email directly or view it on GitHubhttps://github.com/jkrall/analytical/pull/61#issuecomment-12980050.

sfsekaran commented 11 years ago

My vote is if we maintain an .rvmrc, to keep it super simple by default. Like you said, everyone sets up their env in different ways.

sfsekaran commented 11 years ago

I'm going to close this for now--if people still want this we can reopen.