Skip to content

Instantly share code, notes, and snippets.

@unicolet
Last active September 30, 2015 20:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unicolet/1860325 to your computer and use it in GitHub Desktop.
Save unicolet/1860325 to your computer and use it in GitHub Desktop.
Sproutcore official and development from scratch on barebone Ubuntu Linux
#
# 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
@maheshm
Copy link

maheshm commented Feb 29, 2012

"gem install bundler" is being executed twice. Guess its redundant.
Assuming that once the whole thing is gemmed into 1.8 the abbot need not be cloned and that the contents in the Gemfile will be different, right?
What does bundle install --binstubs do?

@dcporter
Copy link

dcporter commented Aug 4, 2013

Confirmed for future googlers that this works. If you're using latest master you may need to use latest abbot and this is the way.

Note that in most cases you can just use "sc-server" on the last line; if that doesn't work then "bundle exec sc-server" is the fallback. Per Umberto's group email, the differentiator appears to be whether the folder "abbot/bin" is successfully created.

@maheshm - correct that if the gem has the most up-to-date copy of abbot then you don't need to go through the above steps to use sproutcore master.

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