improved text
This commit is contained in:
@@ -11,63 +11,73 @@ sudo apt-get install git
|
|||||||
## Ruby
|
## Ruby
|
||||||
|
|
||||||
Ruby versions packaged in official repositories are not suitable to work with consul (at least Debian 7 and 8), so we'll have to install it manually.
|
Ruby versions packaged in official repositories are not suitable to work with consul (at least Debian 7 and 8), so we'll have to install it manually.
|
||||||
The preferred method is via rvm:<br/>
|
|
||||||
**be careful as only the multi user option installs all dependencies automatically, as we use 'sudo'.**
|
The preferred method is via rvm:
|
||||||
|
|
||||||
|
(only the multi user option installs all dependencies automatically, as we use 'sudo'.)
|
||||||
|
|
||||||
###as local user:
|
###as local user:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ curl -L https://get.rvm.io | bash -s stable
|
curl -L https://get.rvm.io | bash -s stable
|
||||||
```
|
```
|
||||||
###for all system users
|
###for all system users
|
||||||
|
|
||||||
```
|
```
|
||||||
$ curl -L https://get.rvm.io | sudo bash -s stable
|
curl -L https://get.rvm.io | sudo bash -s stable
|
||||||
```
|
```
|
||||||
|
|
||||||
and then add your user to rvm group
|
and then add your user to rvm group
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo usermod -a -G rvm <user>
|
sudo usermod -a -G rvm <user>
|
||||||
```
|
```
|
||||||
|
|
||||||
and finally, add rvm script source to user's bash (~/.bashrc) (this step it's only necessary if you still can't execute rvm command)
|
and finally, add rvm script source to user's bash (~/.bashrc) (this step it's only necessary if you still can't execute rvm command)
|
||||||
|
|
||||||
```
|
```
|
||||||
[[ -s /usr/local/rvm/scripts/rvm ]] && source /usr/local/rvm/scripts/rvm
|
[[ -s /usr/local/rvm/scripts/rvm ]] && source /usr/local/rvm/scripts/rvm
|
||||||
```
|
```
|
||||||
with all this, you are suppose to be able to install a ruby version from rvm, as for example version 2.3.0:
|
|
||||||
```
|
|
||||||
rvm install 2.3.0
|
|
||||||
```
|
|
||||||
|
|
||||||
|
with all this, you are suppose to be able to install a ruby version from rvm, as for example version 2.3.0:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo rvm install 2.3.0
|
||||||
|
```
|
||||||
|
|
||||||
## Bundler
|
## Bundler
|
||||||
|
|
||||||
with
|
with
|
||||||
|
|
||||||
```
|
```
|
||||||
gem install bundler
|
gem install bundler
|
||||||
```
|
```
|
||||||
or
|
|
||||||
there is more methods [here](https://rvm.io/integration/bundler)
|
or there is more methods [here](https://rvm.io/integration/bundler) that should be better as:
|
||||||
as:
|
|
||||||
```
|
```
|
||||||
gem install rubygems-bundler
|
gem install rubygems-bundler
|
||||||
```
|
```
|
||||||
should be better
|
|
||||||
|
|
||||||
|
|
||||||
## PostgreSQL (>=9.4)
|
## PostgreSQL (>=9.4)
|
||||||
|
|
||||||
PostgreSQL version 9.4 is not official in debian 7 (wheezy), in 8 it seems to be officially maintained.
|
PostgreSQL version 9.4 is not official in debian 7 (wheezy), in 8 it seems to be officially maintained.
|
||||||
|
|
||||||
So you have to add a repository, the official postgresql works fine.
|
So you have to add a repository, the official postgresql works fine.
|
||||||
|
|
||||||
Add the repository to apt, for example creating file */etc/apt/sources.list.d/pgdg.list* with:
|
Add the repository to apt, for example creating file */etc/apt/sources.list.d/pgdg.list* with:
|
||||||
|
|
||||||
```
|
```
|
||||||
deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main
|
deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main
|
||||||
```
|
```
|
||||||
|
|
||||||
afterwards you'll have to download the key, and install it, by:
|
afterwards you'll have to download the key, and install it, by:
|
||||||
|
|
||||||
```
|
```
|
||||||
wget https://www.postgresql.org/media/keys/ACCC4CF8.asc
|
wget https://www.postgresql.org/media/keys/ACCC4CF8.asc
|
||||||
apt-key add ACCC4CF8.asc
|
apt-key add ACCC4CF8.asc
|
||||||
```
|
```
|
||||||
|
|
||||||
and install postgresql
|
and install postgresql
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -95,10 +105,13 @@ cp config/secrets.yml.example config/secrets.yml
|
|||||||
Perhaps it's needed to create a superuser rol with password in postgresql, and write it in */config/database.yml* 'user:' and 'password:' fields.
|
Perhaps it's needed to create a superuser rol with password in postgresql, and write it in */config/database.yml* 'user:' and 'password:' fields.
|
||||||
|
|
||||||
Also, it seems that postgresql use as default an unix socket for localhost communications. If we encounter problems creating database (connection problems) we can change in */config/database.yml* the line:
|
Also, it seems that postgresql use as default an unix socket for localhost communications. If we encounter problems creating database (connection problems) we can change in */config/database.yml* the line:
|
||||||
|
|
||||||
```
|
```
|
||||||
host: localhost
|
host: localhost
|
||||||
```
|
```
|
||||||
|
|
||||||
for:
|
for:
|
||||||
|
|
||||||
```
|
```
|
||||||
host: /var/run/postgresql
|
host: /var/run/postgresql
|
||||||
```
|
```
|
||||||
@@ -111,8 +124,3 @@ rake db:setup
|
|||||||
rake db:dev_seed
|
rake db:dev_seed
|
||||||
RAILS_ENV=test bin/rake db:setup
|
RAILS_ENV=test bin/rake db:setup
|
||||||
```
|
```
|
||||||
|
|
||||||
and run it in test mode by executing
|
|
||||||
```
|
|
||||||
bin/rails -s
|
|
||||||
```
|
|
||||||
Reference in New Issue
Block a user