Diaspora * Development Environment (Ubuntu 13.04)

Source: Internet
Author: User

1. Install the system dependent Software Package
sudo apt-get install build-essential git curl imagemagick nodejs redis-server libcurl4-openssl-dev libxml2-dev libxslt-dev libmysqlclient-dev
2. confirm that the curl version is 7.32 or later. if the version is smaller than 7.32, run the following command:
sudo apt-get install python-software-propertiessudo apt-add-repository ppa:jaywink/curldebiansudo apt-get update && sudo apt-get dist-upgrade

3. Install Mysql

sudo apt-get install mysql-server

After the installation is complete, mysql automatically starts to check whether the database is started.

sudo netstat -tap | grep mysql

If the following content appears, mysql is started normally.

tcp        0      0 localhost:mysql         *:*                LISTEN      2556/mysqld

If you want to restart mysql, run

sudo serviangce mysql restart

The root user password is required during installation. If you want to change the root user password after installation, run

sudo dpkg-reconfigure mysql-server-5.5

4. Create a separate user for Diaspora

sudo adduser diaspora

Switch to diaspora user

sudo -i -u diaspora

The following operations are performed under the diaspora user.

5. Delete the RVM in ubuntu because the RVM is modified by ubuntu, which may cause many problems.

sudo apt-get --purge remove ruby-rvmsudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh

Open a new terminal Input

env | grep rvm

Check whether output exists. If yes, restart the computer. If no output exists, the deletion is complete.

6. Install RVM

curl -L dspr.tk/1t | bash

Configure RVM and add the following code ~ /. Bashrc

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

Close all terminals and open a new terminal.

7. Install Ruby

rvm install 2.0.0-p353

8. Obtain the source code

cd ~git clone -b master https://github.com/diaspora/diaspora.gitcd diaspora

9. Configure the environment

cp config/database.yml.example config/database.ymlcp config/diaspora.yml.example config/diaspora.yml

In diaspora. yml, you must authorize the certificateThe line of ca-certificates name is opened

10. Obtain the ruby-dependent libraries of diaspora.

RAILS_ENV=production  bundle install --without test development

11. Set the database

bundle exec rake specbundle exec rake db:migrate

Add the password of the mysql root User to database. yml.

12. Pre-compile

bundle exec rake assets:precompile

13. Run

./script/server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.