Bug #4639

Documentation should explain what shell to use for installation commands

Added by Andrew Ring over 1 year ago. Updated over 1 year ago.

Status:Closed Start date:08/27/2010
Priority:Normal Due date:
Assignee:Igal Koshevoy % Done:

0%

Category:-
Target version:1.0.4
Keywords:puppet-dashboard Affected URL:
Branch:http://github.com/igal/puppet-dashboard/tree/bug-4639-install-rubygems-instructions Affected Dashboard version:
Votes: 0

Description

Hello,

I am working my way through the “README.markdown” included with puppet-dashboard-1.0.3. Step 2 could use a little more explanation. What program should the script in Step 2 be run through? I tried to blindly run it through “ruby” and “gem”, but received errors.

   2. Install the `gem` package manager -- do not use the one packaged with the operating system:

   URL="http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz"
   PACKAGE=$(echo $URL | sed "s/\.[^\.]*$//; s/^.*\///")
   pushd "/tmp"
     CACHE=`mktemp -d install_rubygems.XXXXXXXXXX`
     pushd "$CACHE"
       wget -c -t10 -T20 -q "$URL"
       tar xfz "$PACKAGE.tgz"
       cd "$PACKAGE"
       sudo ruby setup.rb
     popd
   popd

Thank you

History

Updated by James Turnbull over 1 year ago

  • Project changed from Puppet to Puppet Dashboard
  • Category deleted (documentation)

Updated by Jacob Helwig over 1 year ago

Andrew,

Step 2 should be able to be copy/pasted into your shell, as-is. It should work with sh, bash, and zsh (at the very least). You’re right that it wouldn’t hurt if we made this more obvious in the documentation.

Updated by Igal Koshevoy over 1 year ago

  • Subject changed from puppet-dashboard install Step 2 is not clear to Documentation should explain what shell to use for installation commands
  • Status changed from Unreviewed to Accepted
  • Target version set to 1.0.4

Andrew: Thank you for filing the bug report so we can provide you and others with better documentation.

That code was meant to be run from the bash shell, the default shell on the operating systems that those installation instructions were written for. However, it will work correctly with zsh. It will not work with sh because of the pushd and popd statements.

Tasks for us to do so we can resolve this issue:

  1. Rewrite the shell commands in the docs using sh syntax for better portability.
  2. Improve the documentation to explain the program to use for executing the commands.

Updated by Jacob Helwig over 1 year ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Assignee set to Igal Koshevoy
  • Branch set to http://github.com/jhelwig/puppet-dashboard/tree/bug-4639-ubuntu-install-rubygems-instructions

I’ve published some changes to the instructions for installing rubygems on Ubuntu 10.04 that I think would make things clearer, and also more portable.

Andrew & Igal: Could you two take a look at the updated README.markdown to see if this new version looks better to you?

Updated by Igal Koshevoy over 1 year ago

  • Assignee changed from Igal Koshevoy to Jacob Helwig

Jacob,

I like your updated instructions and shell script.

Can you please update the similar, but not identical, instructions and shell scripts in the other OS-specific sections, e.g. CentOS 5.5?

I’m not sure about including the shebang line (#!/bin/sh) at the top of the rubygems installer commands because then it’s inconsistent with the rest of the instructions, which don’t have shebang lines.

Can you please add instructions near the top of the README to explain that all commands, unless otherwise specified, are to be run with a Bourne-compatible shell (e.g. sh, bash, dash, etc)?

Updated by Jacob Helwig over 1 year ago

  • Assignee changed from Jacob Helwig to Igal Koshevoy
  • Branch changed from http://github.com/jhelwig/puppet-dashboard/tree/bug-4639-ubuntu-install-rubygems-instructions to http://github.com/jhelwig/puppet-dashboard/tree/bug-4639-install-rubygems-instructions

Igal,

I’ve squashed in the updates to the CentOS 5.5 instructions, and cleaned up the inconsistent indentation/whitespace-usage in a separate commit. I also ditched the shebang lines, and added to the note at the beginning of the instructions section about using an sh compatible shell.

Updated by Igal Koshevoy over 1 year ago

  • Assignee changed from Igal Koshevoy to Jacob Helwig
  • Branch changed from http://github.com/jhelwig/puppet-dashboard/tree/bug-4639-install-rubygems-instructions to http://github.com/igal/puppet-dashboard/tree/bug-4639-install-rubygems-instructions

Jacob,

Great. And also thanks for the cleanup.

I’ve pushed an updated branch that has two very minor text changes regarding what shell and gem to use. Please review.

Updated by Jacob Helwig over 1 year ago

  • Status changed from In Topic Branch Pending Review to Ready For Checkin
  • Assignee changed from Jacob Helwig to Igal Koshevoy

+1 Looks good.

Updated by Igal Koshevoy over 1 year ago

  • Status changed from Ready For Checkin to Closed

Jacob: Thanks, I’ve merged this into next.

Also available in: Atom PDF