Many Windows developers have found that setting up an Ubuntu virtual machine is less painful than getting Ruby and other prerequisites running on Windows.
- Option A: Use VMWare Player and an Ubuntu 14.04 iso image
- Option B: Use vagrant (install):
vagrant init ubuntu/trusty64
- Configure to use 2048mb rather than 512mb RAM (instructions)
vagrant up
vagrant ssh
- Option C: Use AWS EC2: launch Ubuntu 14.04 AMI
- Install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew install https://raw.github.com/quantiverge/homebrew-binary/pdftk/pdftk.rb enscript gs mysql imagemagick rbenv ruby-build
- If it complains about an old version of
X
, runbrew unlink X
and runbrew install X
again - Set up MySQL
- Have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
- Start mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
- Set up RBENV and Ruby 2.0
- Add
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
to~/.profile
- source
~/.profile
- rbenv install 2.0.0-p451
- rbenv global 2.0.0-p451
- rbenv rehash
sudo apt-get install -y aptitude
sudo aptitude update
sudo aptitude upgrade
sudo aptitude install -y git mysql-server mysql-client libmysqlclient-dev libxslt1-dev libssl-dev zlib1g-dev imagemagick libmagickcore-dev libmagickwand-dev nodejs openjdk-7-jre-headless libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev curl
- Hit enter and select default options for any configuration popups
sudo aptitude install npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm update -g npm
sudo npm install -g grunt-cli
git clone https://github.com/code-dot-org/code-dot-org.git
gem install bundler
cd code-dot-org/aws
bundle install
cd ../dashboard
bundle install
bundle exec rake db:create db:schema:load seed:all
cd ../pegasus
bundle install
echo CREATE DATABASE pegasus_development | mysql -uroot
rake db:migrate
rake seed:migrate
Our code is segmented into four parts:
- Blockly Core is the visual programming language platform used for the interactive tutorials.
- Blockly includes apps—blockly puzzles built based on Blockly Core.
- Dashboard, is the tutorial platform which organizes blockly levels into tutorials.
- Pegasus is the main site which also includes the teacher dashboard (support for teachers to track student progress).
cd code-dot-org/dashboard
bundle exec rails server
- Note: after major code updates (or if something seems broken), run
bundle exec rake db:migrate seed:all
- Visit http://localhost.studio.code.org:3000/
cd code-dot-org/pegasus
./up
- Note: after major code updates (or if something seems broken), run
rake db:migrate seed:migrate
- Visit http://localhost.code.org:9393/
The learn.code.org default dashboard install includes a static build of blockly, but if you want to make modifications to blockly or blockly-core:
cd code-dot-org/dashboard
bundle exec rake 'blockly:dev[../blockly]'
- This symlinks to dashboard reference the dev version of blockly
- Follow the blockly build instructions at
blockly/README
or blockly-core build instructions atblockly-core/README
We'd love to have you join our group of contributors!
Anyone who would like to contribute to code.org projects must read and sign the Contribution License Agreement. We aren't able to accept any pull requests from contributors who haven't signed the CLA first.
For the time being—email [email protected] to get an electronic CLA to sign (takes less than a minute).
Join our community development HipChat room for help getting set up, picking a task, etc. We're happy to have you!
If you want to make sure you get our attention, include an @all (everyone) or @here (everyone currently in the room) in your message.
We pull our tasks from a Pivotal Tracker and mark certain tickets as volunteer-friendly.
For the time being—for access to Pivotal Tracker, email [email protected].
We support recent versions of Firefox, Chrome, IE9, iOS Safari and the Android browsers. Be sure to try your feature out in IE9, iOS and Android if it's a risk. BrowserStack live or Sauce Labs manual let you run manual tests in these browsers remotely.
For dashboard changes, be sure to test your changes using rake test
. For blockly changes, see our grunt testing instructions.
Our continuous integration server regularly runs a suite of UI tests using Selenium / Cucumber which run against many browsers via BrowserStack Automate, and can also be run locally using chromedriver
. See the README in that folder for instructions.
If your changes might affect level paths, blockly UI, or critical path site logic, be sure to test your changes with a local UI test.
Contributors should follow the GitHub fork-and-pull model to submit pull requests into this repository.
- On your fork, you'll either push to your own finished branch or checkout a new branch for your feature before you start your feature
git checkout -b branch_name
- Develop the new feature and push the changes to your fork and branch
git add YYY
git commit -m "ZZZ"
git push origin branch_name
- Go to the code-dot-org GitHub page
- For your submissinon to be reviewed
- Click on the "Pull Request" link, look over and confirm your diff
- Submit a pull request for your branch to be merged into staging
- For bonus points, include screenshots in the description. Command + Ctrl + Shift + 4 in OS X lets you copy a screen selection to your clipboard, which GitHub will let you paste right into the description
- After your pull request is merged into staging, you can review your changes on the following sites: