Installation/Script: Difference between revisions

From diaspora* project wiki
(Undo revision 3202 by Augier (talk))
(Undo revision 3199 by Augier (talk))
Line 1: Line 1:
== Foreword ==
== Quick Start ==


This articles focuses on how to get a development environment setup on a linux distribution.
Here's how to get a [http://guides.rubyonrails.org/getting_started.html development environment] up and running. This is where any new pod runner should start, as well as anyone looking to contribute to diaspora*.
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#IRC|IRC]]


The project uses the following tools with following versions. We will explain you how to get them :
This script assumes you have a [http://railsapps.github.io/installing-rails.html basic Rails setup installed].


{|
==== Step 1: Run the script and follow the on screen instructions. ====
! style="text-align:left;"| Tool
! Version
|-
| Ruby
| 2.0.0p481
|-
| Ruby Gem
| any
|-
| Rails
| 4.1.6
|-
| RVM
| any
|-
| Rspec
| 3.0
|-
| Bundler gem
| any
|}


==== Step 1: Get the sources and install the tools ====
  bash <(curl https://raw.githubusercontent.com/diaspora/diaspora/master/script/install.sh)


The diaspora* project uses git and Github to manage sources. You can clone them with the following command :
==== Step 2: Run the development server ====


    git clone https://github.com/diaspora/diaspora.git
  rails s


Then, to get the tools, you must use the packaging command-line tool of your distribution : <tt>apt-get</tt>, <tt>urpmi</tt>, <tt>yum</tt>, etc...
then visit 'http://localhost:3000' in your browser.
Ruby should be in every decent distribution repo :


  # On Mageia/Mandriva :
==== Step 3 (for developers): Run tests ====
  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 :
  rake
 
  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 [https://rubygems.org/pages/download 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 <tt>rvm</tt> and <tt>bundler</tt> gems installed.
 
==== Step 2: Setting up the environment ====
 
Once you have <tt>rvm</tt> and <tt>bundler</tt> 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 <tt>--default</tt> option will make ruby use the version by default in every shell. Without this option, you will have to type <tt>rvm use 2.0.0-p481</tt> each time you want to start the diaspora server.
 
Then, install all the required bundles :
 
    bundle update
 
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 <tt><<: *mysql</tt> and uncomment <tt>#<<: *postgres</tt>
 
If you want to work on the XMPP chat, please also follow the instructions [[Vines|there]].


==== Step 3 : start the server ! ====
==== Step 4 (for everyone): Party! ====


    ./script/server
and go to the page [http://0.0.0.0:3000 http://0.0.0.0:3000]
==== Step 4 : Run tests ====
  rake


==== Step 5 : Troubles ? ====
== Main installation guides ==
Want a production setup? Having trouble with the installation script? Want to install diaspora* the slow way?


You have many ways to [[How_we_communicate|contact us]]
Read the specific installation guides [http://wiki.diasporafoundation.org/Installation_guides here].

Revision as of 14:15, 24 September 2014

Quick Start

Here's how to get a development environment up and running. This is where any new pod runner should start, as well as anyone looking to contribute to diaspora*.

This script assumes you have a basic Rails setup installed.

Step 1: Run the script and follow the on screen instructions.

 bash <(curl https://raw.githubusercontent.com/diaspora/diaspora/master/script/install.sh)

Step 2: Run the development server

 rails s

then visit 'http://localhost:3000' in your browser.

Step 3 (for developers): Run tests

 rake

Step 4 (for everyone): Party!

Main installation guides

Want a production setup? Having trouble with the installation script? Want to install diaspora* the slow way?

Read the specific installation guides here.