Installation/Script: Difference between revisions

From diaspora* project wiki
(Rewrite the page to be more specific)
(Note that the script got removed.)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Foreword ==
{{Out of date}}
{{Note|The script got removed due to not being maintained and having bugs. You can try an alternative script at https://github.com/Raven24/diaspora-install}}


This articles focuses on how to get a development environment setup on a linux distribution.
== Quick Start ==
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 :
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*.


{|
This script assumes you have a [http://railsapps.github.io/installing-rails.html basic Rails setup installed].
! 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 ====
==== Step 1: Run the script and follow the on screen instructions. ====


The diaspora* project uses git and Github to manage sources. You can clone them with the following command :
  bash <(curl https://raw.githubusercontent.com/diaspora/diaspora/master/script/install.sh)


    git clone https://github.com/diaspora/diaspora.git
Alternatively you can also try an experimental install script (written in Ruby): [https://github.com/Raven24/diaspora-install see here]


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...
==== Step 2: Run the development server ====
Ruby should be in every decent distribution repo :


  # On Mageia/Mandriva :
  rails s
  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 :
then visit 'http://localhost:3000' in your browser.


  urpmi ruby-RubyGems
==== Step 3 (for developers): Run tests ====
  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 :
  rake
 
  # 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.
==== Step 4 (for everyone): Party! ====
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 ! ====
    ./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 [[Installation|here]].

Latest revision as of 13:19, 2 May 2015

Out of dateOut of date:This page's accuracy may be compromised due to out-of-date information. Please help improve the page by updating it. There may be additional information on the talk page.
NoteNote:The script got removed due to not being maintained and having bugs. You can try an alternative script at https://github.com/Raven24/diaspora-install

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)

Alternatively you can also try an experimental install script (written in Ruby): see here

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.