6

My RVM system-wide installation scripts are broken, both in the form of Linode StackScripts and Chef-solo Recipes.

Per the instructions on the RVM website, my scripts execute the following commands as root to install RVM on a system-wide basis:

echo "Installing RVM system-wide" >> $logfile
bash < <( curl -L http://bit.ly/rvm-install-system-wide )
cat >> /etc/profile <<'EOF'
# Load RVM if it is installed,
#  first try to load  user install
#  then try to load root install, if user install is not there.
if [ -s "$HOME/.rvm/scripts/rvm" ] ; then
  . "$HOME/.rvm/scripts/rvm"
elif [ -s "/usr/local/rvm/scripts/rvm" ] ; then
  . "/usr/local/rvm/scripts/rvm"
fi
EOF

source /etc/profile

The key piece above is the url http://bit.ly/rvm-install-system-wide. As of today, 3/24/2011, this url no longer in service. It results in a GitHub 404 error.

The following url on the RVM website used to contain the instructions for the system-wide install: http://rvm.beginrescueend.com/deployment/system-wide/. However, that url now redirects to the RVM homepage.

In the interests of getting RVM system-wide installation scripts to work again, what are the new instructions?

ms-ati
  • 1,297
  • 1
  • 13
  • 17
  • Probably easiest do pop into #rvm on IRC and ask there, it seems they just removed the instructions on the system wide install. – Michael Kohl Mar 24 '11 at 15:52
  • @Michael-Kohl, thanks, I attempted that, but the FreeNode IRC bot has not actually gotten a verification email to me after an hour. Considering how wide-spread those installation instructions are -- just try googling "http://bit.ly/rvm-install-system-wide" -- I hope someone who has a verified nick on IRC can get an answer and post it here. – ms-ati Mar 24 '11 at 16:02
  • (UPDATE) I finally got IRC nick verified and have asked on IRC. There are others asking the same question now... – ms-ati Mar 24 '11 at 16:05
  • 1
    (UPDATE) I've received a hostile response in IRC. Apparently the system-wide installation mechanism is hated by the author, as evidenced by the commit message here where it was removed: https://github.com/wayneeseguin/rvm/commit/b4efba0b618837db5658666fa80efddccb94ff73 – ms-ati Mar 24 '11 at 16:35
  • (UPDATE) IRC discussion appears to have been permanently archived at http://irclogger.com/.rvm/2011-03-24 for those interested... – ms-ati Jun 23 '11 at 16:48

2 Answers2

9

Just received the following answer from the lead developer, wayneeseguin, on #rvm:

[12:53] "the author" merged it into the ain installer [12:53] so you should be doing bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) # http://rvm.beginrescueend.com/rvm/install/
[12:53] the code has just changed and the documentation hasn't caught up [12:53] for both root and user installs

It is true that RVM 1.5.1 will successfully install into /usr/local/bin just by installing as root. However, for some reason, all the existing Chef and Puppet provisioning scripts that are in use today do not appear to survive this version bump. This is unfortunate, as Wayne E. Seguin has made clear that RVM below version 1.5.0 will not be supported.

That said, we need our systems to work today. In order to continue to use RVM 1.3.0, which the existing scripts support, you need to replace the following line:

bash < <( curl -L http://bit.ly/rvm-install-system-wide )

With the following line (found by phlipper):

bash -c "bash <( curl -L https://github.com/wayneeseguin/rvm/raw/1.3.0/contrib/install-system-wide ) --version '1.3.0'"
ms-ati
  • 1,297
  • 1
  • 13
  • 17
  • Wayne, the developer, added an [answer to another message](http://stackoverflow.com/questions/5412589/errors-installing-rvm/5414184#5414184) saying its a single script now for user sandboxes and system wide. – the Tin Man Mar 24 '11 at 20:07
  • @the-Tin-Man: Yes, that is correct. However, existing provisioning scripts for Chef, Puppet, and StackScripts that install via old url do not immediately work correctly with the new HEAD version, due to changes in path and profile inclusion. The posted snippet allows us to keep our production deploy scripts at RVM 1.3.0, so that they keep working, rather than the entire world porting all deploy scripts in a single day to RVM 1.5.1 – ms-ati Mar 24 '11 at 20:29
9

Here is my fix to install the last working version before he major change:

bash <( curl -L https://github.com/wayneeseguin/rvm/raw/1.3.0/contrib/install-system-wide ) --version '1.3.0'

This is working for me now in production. Good luck!

UPDATE

Also, if you are using the chef cookbook from https://github.com/fnichol/chef-rvm or something similar, you can use the following options:

:rvm => {
  :system_installer_url => "https://github.com/wayneeseguin/rvm/raw/1.3.0/contrib/install-system-wide",
  :version => "1.3.0"
}
Matt
  • 724
  • 4
  • 11
phlipper
  • 1,834
  • 15
  • 14