Installing Sproutcore (stable and dev) on Linux

This is just a note-to-self kind of post. Official instruction, available here, do not explain how to setup the development version (which currently is 1.7.1.beta).

This is the full list of command (ran and tested on Ubuntu Lucid Lynx 10.04), just need to type the occasional yes.

#
# Use these commands to install sproutcore official (and development version)
# on Ubuntu linux
#
# Tested on Lucid Lynx provisioned by vagrant (http://vagrantup.com/)
#
sudo apt-get install curl
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
source /home/vagrant/.rvm/scripts/rvm
source /home/vagrant/.profile
rvm install 1.9.2
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
rvm use 1.9.2
rvm default 1.9.2
. ~/.bash_profile
ruby -v
sudo apt-get install g++
#
# In some cases (happened to me on ubuntu 11) ruby/sproutcore commands give an error
# about zlib, openssl or other libraries not being found.
# To fix it run the additional commands (documentation link: https://rvm.beginrescueend.com/packages/zlib/):
# rvm pkg install zlib <- insert name of library here
# rvm reinstall 1.9.2
#
gem install bundler
gem install sproutcore
#
# Next steps are qrequired only if you want to develop on Sproutcore
# and/or use the latest and greatest version from github (use at your own risk)
#
sudo apt-get install git-core || sudo apt-get install git
mkdir Development
cd Development/
git clone https://github.com/sproutcore/abbot.git
sc-init MyProject
cd my_project/
cat > Gemfile <<EOF
source "http://rubygems.org"
gem "sproutcore", :path => "../abbot/"
EOF
bundle install --binstubs
mkdir frameworks
cd frameworks
git clone https://github.com/sproutcore/sproutcore.git
cd ..
bundle exec sc-server

For those cases when bundle fails (happened to me) to create the bin directory with the beta version of sc-* tools just type the longer variant:

bundle exec sc-server

Popular posts

Mirth: recover space when mirthdb grows out of control

1/4/2000 to 1/4/2025: the beginning

From 0 to ZFS replication in 5m with syncoid