-
Notifications
You must be signed in to change notification settings - Fork 0
Mac First Run
For this tutorial, the following is assumed:
-
~
points to your user directory -
$CLOUDSDALE
points to the directory your local copy of Cloudsdale is in - RVM is installed in
~/.rvm
- Neither RVM nor any Ruby executables are installed as root/sudo
Github has a great guide to setting up Git for OS X here. Make sure to use your preferred display name (generally either your Github username or your real name) as well as your Github email address for the final steps.
Brew is going to be used to get all the neccessary native code for Ruby. The first thing you'll need is a C compiler. Normally, one would use Xcode for this, but Xcode 4.2 and later's llvm compiler is NOT fully supported as of Ruby 1.9.3 and can cause some issues with gems that rely on native extensions. You may attempt to use it if you like, but it's recommended to use either Xcode 4.1 and earlier with the commandline tools or OS X GCC.
You should get Xcode and use it (Google is your friend on this one).
You may use either Xcode 4.1 or earlier, or you may use OS X GCC from here. Simply download and run the file appropriate for your OS.
Now that you have a GCC compiler you can install Brew by pasting the following command into your terminal:
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
Ruby Version Manager (RVM) is the easiest way to install, update and maintain your Ruby install. To install RVM, simply paste the following into your Terminal:
curl -L get.rvm.io | bash -s stable --rails
Now that you have RVM installed, we're going to modify your Bash profile so you can use it from the commandline. Run nano ~/.bash_profile
and make sure the line [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
is located in your file. If it isn't add it to the end of the file and. Press ^X to exit, choosing to save if you made any changes.
If you had any terminals open, either close and re-open them or use source ~/.bash_profile
to make sure you can use RVM.
Cloudsdale currently uses Ruby 1.9.3, so we're going to make sure you have that installed. As of the time of writing, Ruby 1.9.3 is included as part of the RVM installer, but we're going to make sure you have it by running rvm install 1.9.3
Some of the gems Cloudsdale uses require native extensions from Brew. To get them, run the following:
brew install rabbitmq mongo node.js redis
Follow the steps to clone Cloudsdale using your GUI.
First
cd $CLOUDSDALE
then
git clone git@github.com:IOMUSE/Cloudsdale.git
For these instructions, make sure your terminal is in $CLOUDSDALE
Every time an update is pushed, you should run this command to make sure all your gems are properly setup. The command is:
bundle install
This should get all the neccessary gems you need to run Cloudsdale. If you get any errors, feel free to ask in the Meta cloud, or check the Known Issues page here on Github.
The first time you run Cloudsdale, you need to properly setup your local database.
Assuming you're still in $CLOUDSDALE
, run mkdir db/data/mongodb
While still in $CLOUDSDALE
run foreman start
. Next open another terminal or terminal tab and run mongo localhost:52331
Now that you're connected, run
use cloudsdale_development
db.addUser("cloudsdale_development", $PWD)
where $PWD is the password line from the development section of mongoid.yml
. When this is done, you can exit mongo.
Next, with foreman still running, use the command bundle exec rake db:migrate
to create all the server entities you need to run Cloudsdale.
Now that you have your database user make sure that foreman is still running in your other tab/window, open two more tabs/windows and then run rails s
in one and redis-server
in the other to start up the Cloudsdale web server. You can now direct your browser to local.cloudsdale.org:3000
to interact with the web forms, or run rails c
in another tab/window to interact with Cloudsdale from the commandline.