swcarpentry / DEPRECATED-bc

DEPRECATED: This repository is now frozen - please see individual lesson repositories.
Other
299 stars 383 forks source link

Students need help configuring RStudio to find git executable #593

Closed noamross closed 7 years ago

noamross commented 10 years ago

At our bootcamp at UC Davis (July 15-16, 2014), we found that RStudio in Windows did not automatically find the git executable file. Helpers and instructors had to help all the Windows users find the file and set in in RStudio options. Ideally install instructions would include this, and it would be on a pre-lesson checklist.

ethanwhite commented 10 years ago

I ran into this recently and fixed it. I think the solution was to make one change to the defaults when installing Git Bash/msysgit. My recollection is that selecting Use Git from the Windows Command Prompt on the Adjusting your PATH environment screen of the installer fixes this, but it's been a couple of months so this should be tested. If it works we should update the setup docs, at least for the R bootcamps and probably in general.

ethanwhite commented 10 years ago

I just tested this on Windows 7 and it works.

BernhardKonrad commented 10 years ago

Instructions on how to tell Rstudio where to find git are here: http://jennybc.github.io/2014-05-12-ubc/r-setup.html

and the key screenshot is http://www.molecularecologist.com/wp-content/uploads/2013/11/Screenshot-2013-11-12-09.53.56-Copy1.png

Maybe Ethan's solution is easier, otherwise we could move these instructions to the bc repo.

On Thursday, July 10, 2014, Ethan White notifications@github.com wrote:

I just tested this on Windows 7 and it works.

— Reply to this email directly or view it on GitHub https://github.com/swcarpentry/bc/issues/593#issuecomment-48645420.

wking commented 10 years ago

On Thu, Jul 10, 2014 at 11:48:51AM -0700, Bernhard Konrad wrote:

and the key screenshot is http://www.molecularecologist.com/wp-content/uploads/2013/11/Screenshot-2013-11-12-09.53.56-Copy1.png

Since cmd.exe is such an odd shell, I'd lean towards this approach for the “Use Git Bash as shell for Git projects”. Then we get both Git availability and a more standard shell.

ethanwhite commented 10 years ago

Since cmd.exe is such an odd shell, I'd lean towards this approach for the “Use Git Bash as shell for Git projects”. Then we get both Git availability and a more standard shell.

I think maybe you're misunderstanding the setting. It doesn't require the use of cmd.exe, it just adds Git to the path so that it can be found by cmd.exe and, by extension, RStudio.

wking commented 10 years ago

On Thu, Jul 10, 2014 at 12:01:09PM -0700, Ethan White wrote:

Since cmd.exe is such an odd shell, I'd lean towards this approach for the “Use Git Bash as shell for Git projects”. Then we get both Git availability and a more standard shell.

I think maybe you're misunderstanding the setting. It doesn't require the use of cmd.exe, it just adds Git to the path so that it can be found by cmd.exe and, by extension, RStudio.

That's your approach, right? @BernhardKonrad's approach (which I was advocating) is tweaking the RStudio install, not the msysGit install.

ethanwhite commented 10 years ago

That's your approach, right? @BernhardKonrad's approach (which I was advocating) is tweaking the RStudio install, not the msysGit install.

Yes, but I'm confused as to your objection. All that changing that setting is doing is adding git to the Windows path, so I don't see cmd.exe as having anything to do with it. We still use the same shell we've been using and it behaves in exactly the same way.

The advantage I see for doing it with the installer setting is that it seems a bit less scary and it's something the students can easily do before hand. The downside to this approach is that it's possible that the students won't read the instructions carefully and miss that step.

wking commented 10 years ago

On Thu, Jul 10, 2014 at 12:28:07PM -0700, Ethan White wrote:

That's your approach, right? @BernhardKonrad's approach (which I was advocating) is tweaking the RStudio install, not the msysGit install.

Yes, but I'm confused as to your objection.

No objection, and if I had a Windows box I'd probably do both (add Git to the PATH and tell RStudio to use Git Bash as it's shell). But for new students, maybe two installer configuration changes is too many?

All that changing that setting is doing is adding git to the Windows path, so I don't see cmd.exe as having anything to do with it.

But it does have something to do with the default RStudio shell, right? The RStudio config setting will determine whether you get POSIX syntax in shells launched from RStudio.

The advantage I see for doing it with the installer setting is that it seems a bit less scary and it's something the students can easily do before hand.

Ah, was the RStudio setting not an install-time choice? I missed that. In that case, the ease of using just the install-time msysGit config probably outweighs the extra usefulness of changing RStudio's default shell.

ethanwhite commented 10 years ago

But it does have something to do with the default RStudio shell, right? The RStudio config setting will determine whether you get POSIX syntax in shells launched from RStudio.

Ah, I see the confusion. Those settings that you see in: http://www.molecularecologist.com/wp-content/uploads/2013/11/Screenshot-2013-11-12-09.53.56-Copy1.png

get set automatically by RStudio if you use the msysGit installation option that I mentioned. So the result is identical regardless of how you accomplish it.

wking commented 10 years ago

On Thu, Jul 10, 2014 at 12:43:54PM -0700, Ethan White wrote:

Ah, I see the confusion. Those settings … get set automatically …

Ah, sorry to have muddied the waters ;). In that case, I prefer whatever is easiest to do, and it sounds like that's checking the msysGit install setting.

naupaka commented 10 years ago

I second (third?) @ethanwhite 's suggestion to have the students select the appropriate setting during the Git-Bash install process. Seems like the lesser of two hassles.

ethanwhite commented 9 years ago

We are considering the possibility of handling the entire Git-Bash install via the SWC Windows Installer in https://github.com/swcarpentry/windows-installer/issues/6. I wonder if we can trigger that option automatically when running the installer that way.

ethanwhite commented 9 years ago

I think we've abandoned handling the entire Git Bash install in the Windows Installer, so I think we need to just update the installation instructions to have them change the setting during the Git Bash install and be prepared to have them reinstall Git Bash if they forget to do it correctly the first time.