Skip to content

Instantly share code, notes, and snippets.

@janjongboom
Created July 15, 2012 13:09
Show Gist options
  • Save janjongboom/3116835 to your computer and use it in GitHub Desktop.
Save janjongboom/3116835 to your computer and use it in GitHub Desktop.
Use Ruby 1.9.3 on Cloud9 IDE
**Cloud9 now has rvm, so you can switch easily (`rvm use X`), no need for this gist anymore**
# first thing to do is to get your VM's GUID
# do a 'pwd' in the console and grab the part after /var/lib/stickshift
# -> replace all GUID calls in this file :-)
create file: .gemrc
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
gemhome: /var/lib/stickshift/GUID/app-root/data/.gems
gempath:
- /var/lib/stickshift/GUID/app-root/data/gems/1.8
cp .gemrc ../
# install rvm
curl -L https://get.rvm.io | bash -s stable --ruby
# so this needs to be done every time apparently, add it to bashrc or something
# RUN IT IN TERMINAL! (Open via ALT+T)
source /var/lib/stickshift/GUID/app-root/data/.rvm/scripts/rvm
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
rvm use 1.9.3
ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
Ruby is now in ~/.rvm/rubies/ruby-1.9.3-p194/bin/ruby in case you want to run it that way
# add to ~/.bashrc
source $HOME/.rvm/scripts/rvm
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
rvm use 1.9.3
@bnoordhuis
Copy link

@bm5k: That looks like a bug in the libyaml automake script. It's probably written for an older (or possibly newer) version of autotools than what the C9 VMs ship with.

Copy link

ghost commented Jul 16, 2012

@janjongboom for now, I am progressing without it.

@bnoordhuis I don't know enough about the environment C9 provides in its workspaces to know the answer to that.

@bnoordhuis
Copy link

@bm5k: Just tried it, seems to work for me. You may have to run autoreconf -ivf first.

Copy link

ghost commented Jul 17, 2012

Can all instances of /var/lib/stickshift/GUID/app-root/data/ be safely replaced with $HOME in the script above?

@janjongboom
Copy link
Author

Yeah pretty sure.

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