This articles focuses on how to get a development environment setup on a linux distribution. Besides installation means, the setting up should be pretty the same on Windows. If you have any problem, don't hesitate to join us on IRC
The project uses the following tools with following versions. We will explain you how to get them :
Step 1: Get the sources and install the tools
The diaspora* project uses git and Github to manage sources. You can clone them with the following command :
git clone https://github.com/diaspora/diaspora.git
Then, to get the tools, you must use the packaging command-line tool of your distribution : apt-get, urpmi, yum, etc... Ruby should be in every decent distribution repo :
# On Mageia/Mandriva : urpmi ruby # On Ubuntu/Debian : apt-get install ruby # On Fedora/CentOS : yum install ruby
The other tools might or might not be prepackaged by your distribution. On Mageia/Mandriva Linux, you should do the following :
urpmi ruby-RubyGems urpmi ruby-rails urpmi ruby-rvm urpmi ruby-rspec urpmi ruby-bundler
Your distribution might have a different naming scheme for ruby packages. If they are not named the same way than on Mageia/Mandriva, you can search them with the following :
# On Fedora/CentOS : yum search rvm # On Debian/Ubuntu : apt-cache search rvm
If you can't find any of these, you should be able to get all the required tools with RubyGems. Please refer to the following page to see how to install and use it.
It is better to use the tools packaged by your distribution than these installed by gem if they exists. At least, you should have the rvm and bundler gems installed.
Step 2: Setting up the environment
Once you have rvm and bundler installed, place yourself in the diaspora source directory and type :
# Will install the correct version of ruby rvm install 2.0.0-p481 # Will use the correct version of ruby by default rvm use 2.0.0-p481 --default
the --default option will make ruby use the version by default in every shell. Without this option, you will have to type rvm use 2.0.0-p481 each time you want to start the diaspora server.
Then, install all the required bundles :
One last step : configure all the config files ! Move to ./config and copy all the .example files renaming them by removing the .example part. You should have three : diaspora.yml.example, database.yml.example and schedule.yml.example. Or you can do it with one command-line... because it's cool !
for file in `ls *.example`; do cp "$file" `echo "$file" | sed s/.example//`; done
Then, edit the file database.yml to set the credentials to your database. by default, it is using mysql, but you can set postgres. You just have to comment the line <<: *mysql and uncomment #<<: *postgres
If you want to work on the XMPP chat, please also follow the instructions there.
Step 3 : start the server !
and go to the page http://0.0.0.0:3000
Step 4 : Run tests
Step 5 : Troubles ?
You have many ways to contact us