Last active
December 5, 2015 18:32
-
-
Save JoaoGFarias/b00c8a527599cbdfb5c9 to your computer and use it in GitHub Desktop.
Shell script for setting up a OSX envirioment to development of OpenRedu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License | |
# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
#You can find more information about the OpenRedu on the project's repository | |
#https://github.com/OpenRedu/OpenRedu | |
#The commands are based on the project's instructions | |
#https://github.com/OpenRedu/OpenRedu/wiki/Redu-Setup#mac-os | |
#This script starts a new enviorment for OpenRedu development | |
#Beware that it will delete all the OpenRedu related data if there is any | |
#It assumes that the MySQL server is already running | |
#Installing dependencies. If there are already installed, nothing happens | |
gem install rubyzip -v '0.9.9' | |
bundle update therubyracer | |
bundle install | |
#Deletes data and create a clean database | |
rake db:drop db:create db:migrate | |
#Starts submodules | |
git submodule init; git submodule update | |
#Insert necessary data | |
rake bootstrap:all | |
#Starts MongoDB server | |
rake sunspot:solr:run | |
#Starts Rails server | |
rails s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License | |
# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
#You can find more information about the OpenRedu on the project's repository | |
#https://github.com/OpenRedu/OpenRedu | |
#The commands are based on the project's instructions | |
#https://github.com/OpenRedu/OpenRedu/wiki/Redu-Setup#mac-os | |
#Installing XCode | |
#TODO - Before installing, check if it is not already installed | |
xcode-select --install | |
#Installing RVM | |
\curl -sSL https://get.rvm.io | bash | |
#Installing correct Ruby's version | |
if [ $(ruby -e 'print RUBY_VERSION') != "1.9.3" ] | |
then | |
echo "Changing default Ruby's version to 1.9.3-p551" | |
rvm install ruby 1.9.3-p551 | |
rvm --default use 1.9.3 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment