# Installing Primero v2 for development on Ubuntu 18.04

**URL:** <https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300>\
**Category:** Primero IMS\
**Tags:** v2-0\
**Created:** [March 20, 2020, 8:22pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300 "2020-03-20T20:22:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [March 20, 2020, 8:22pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/1 "2020-03-20T20:22:26Z")

</div>

First check out the primero source code from the repository. For example:

```
    mkdir ~/Dev/tmp
    cd ~/Dev/tmp
    git clone https://github.com/primeroIMS/primero.git
    cd primero

```

We then need to get the specific branch for v2 work. To fetch a specific branch, you need to do this:

` git fetch origin`

This will fetch all of the remote branches for you. With the remote branches in hand, you now need to check out the branch you are interested in, giving you a local working copy:

`git checkout -b development_v2 origin/development_v2`

You can check your working branch now by doing

` git branch`

which should show you development\_v2. Then move into the docker folder

` cd docker`

and then pull the docker images

```
cp local.env.sample.development local.env
sudo ./build.sh postgres
sudo ./build.sh solr
sudo ./compose.local.sh up -d postgres
sudo ./compose.local.sh run solr make-primero-core.sh primero-test
sudo ./compose.local.sh up -d solr

```

Now that the services have started we need to install the ruby version manager

```
sudo apt install software-properties-common
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt update && sudo apt-get install rvm

```

It is a good idea to restart your system now unless you know how to start rvm with your .bashrc file. If you do restart make sure that you start the services again that v2 needs. So that is move into the docker folder again and start the services e.g

```
sudo ./compose.local.sh up -d postgres
sudo ./compose.local.sh run solr make-primero-core.sh primero-test
sudo ./compose.local.sh up -d solr

```

Now install the latest version of ruby

`rvm install 2.6.5`

and also node

```
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

```

and some binary dependencies

`sudo apt-get install -y libpq-dev imagemagick libsodium-dev p7zip`

Next move back into the root of the folder and install

```
cd ../
bundle install
npm install

```

and then copy the config files (review them and change anything you need)

```
cp config/database.yml.development config/database.yml
cp config/locales.yml.development config/locales.yml
cp config/mailers.yml.development config/mailers.yml
cp config/sunspot.yml.development config/sunspot.yml

```

The final step is to set some environment variables for your shell (these are 3 separate commands)

```
$ echo "export PRIMERO_SECRET_KEY_BASE=PRIMERO_SECRET_KEY_BASE" >> ~/.bashrc
$ echo "export DEVISE_SECRET_KEY=DEVISE_SECRET_KEY" >> ~/.bashrc
$ echo "export DEVISE_JWT_SECRET_KEY=DEVISE_JWT_SECRET_KEY" >> ~/.bashrc

```

and then either close and reopen the bash shell or run this command in the same shell to load the environment you just set

`source ~/.bashrc`

Next is to create a logging directory and file so that we can log errors

```
mkdir log
touch log/development.log

```

and then prepare the database

```
rails db:create
rails db:migrate
rails db:seed

```

This last command should create all of the tables and populate them. It should output something like

```
Seeding Lookups
Seeding Lookup.
Updating lookup lookup-location-type
Updating lookup lookup-country
Updating lookup lookup-nationality
Updating lookup lookup-ethnicity
Updating lookup lookup-language
Updating lookup lookup-religion
Updating lookup lookup-case-status
Updating lookup lookup-conference-case-status
Updating lookup lookup-incident-status
Updating lookup lookup-displacement-status
Updating lookup lookup-unaccompanied-separated-status
Updating lookup lookup-protection-status
Updating lookup lookup-verification-status
Updating lookup lookup-risk-level
Updating lookup lookup-gbv-sexual-violence-type
Updating lookup lookup-cp-violence-type
Updating lookup lookup-armed-force-group-type
Updating lookup lookup-armed-force-group-name
Updating lookup lookup-separation-cause
Updating lookup lookup-service-type
Updating lookup lookup-followup-type
Updating lookup lookup-protection-concerns
Updating lookup lookup-unhcr-needs-codes
Updating lookup lookup-yes-no
Updating lookup lookup-yes-no-unknown
Updating lookup lookup-yes-no-undecided
Updating lookup lookup-yes-no-not-applicable
Updating lookup lookup-gbv-reported-elsewhere
Updating lookup lookup-approval-type
Updating lookup lookup-gbv-approval-types
Updating lookup lookup-approval-status
Updating lookup lookup-gender
Updating lookup lookup-inquiry-status
Updating lookup lookup-service-referred
Updating lookup lookup-workflow
Updating lookup lookup-service-implemented
Updating lookup lookup-service-response-type
Updating lookup lookup-marital-status
Updating lookup lookup-marital-status-with-spouse
Updating lookup lookup-marital-status-unknown
Updating lookup lookup-perpetrator-relationship
Updating lookup lookup-time-of-day
Updating lookup lookup-incident-location
Updating lookup lookup-incident-identification
Updating lookup lookup-disability-type
Updating lookup lookup-disability-type-with-no
Updating lookup lookup-transition-type
Updating lookup lookup-assessment-duration
Updating lookup lookup-child-minor-age-group
Updating lookup lookup-age-group-type
Updating lookup lookup-discovery-method
Updating lookup lookup-assessment-progress
Updating lookup lookup-further-action_needed
Updating lookup lookup-family-relationship
Updating lookup lookup-tracing-status
Updating lookup lookup-form-group-cp-case
Updating lookup lookup-form-group-cp-tracing-request
Updating lookup lookup-form-group-cp-incident
Updating lookup lookup-form-group-gbv-case
Updating lookup lookup-form-group-gbv-incident
Updating lookup lookup-agency-office
Seeding Export Configuration
Seeding ExportConfiguration.
Updating export configuration export-unhcr-csv
Updating export configuration export-unhcr-csv-jo
Updating export configuration export-duplicate-id-csv
Seeding the system settings
Seeding SystemSettings.
Updating System Settings
[Re-]Seeding the forms
Seeding FormSection.
Seeding Programs
Seeding PrimeroProgram.
Updating program primeroprogram-primero
Seeding Modules
Seeding PrimeroModule.
Updating module CP
Updating module GBV
Seeding Roles
Seeding Role.
Updating role role-cp-administrator
Updating role role-cp-case-worker
Updating role role-cp-manager
Updating role role-cp-user-manager
Updating role role-gbv-social-worker
Updating role role-gbv-manager
Updating role role-gbv-user-manager
Updating role role-gbv-caseworker
Updating role role-gbv-mobile-caseworker
Updating role role-gbv-case-management-supervisor
Updating role role-gbv-program-manager
Updating role role-gbv-organization-focal-point
Updating role role-agency-user-administrator
Updating role role-gbv-agency-user-administrator
Updating role role-gbv-system-administrator
Updating role role-referral
Updating role role-transfer
Updating role role-ftr-manager
Updating role role-superuser
Seeding User Groups
Seeding UserGroup.
Updating user group usergroup-primero-cp
Updating user group usergroup-primero-ftr
Updating user group usergroup-primero-gbv
Seeding Agencies
Seeding Agency.
Updating agency UNICEF
Seeding Users
Seeding User.
Updating user primero
Updating user primero_admin_cp
Updating user primero_cp
Updating user primero_mgr_cp
Updating user primero_gbv
Updating user primero_mgr_gbv
Updating user primero_ftr_manager
Updating user primero_user_mgr_cp
Updating user primero_user_mgr_gbv
Updating user agency_user_admin
Updating user primero_system_admin_gbv
Updating user agency_user_admin_gbv
Updating user primero_cp_ar
Updating user primero_mgr_cp_ar
Updating user primero_gbv_ar
Updating user primero_mgr_gbv_ar
Creating user primero_sup_gbv
Seeding Default Reports
Seeding Report.
Seeding ContactInformation.

```

The last thing to do is to generate the translation files

`bin/rails primero:i18n_js`

and then start the server.

```auto
foreman start -f Procfile.dev

```

And it gave an error!

 ![image](https://support.primero.org/uploads/primero/original/1X/d23cea28ae5ba8992b2e4104fb2eb1e430b81a2d.png)

Lets dig into that and see what the issue is. Lets check our node version

```
ian@wintermute:~/Dev/tmp/primero$ node -v
v6.11.1

```

That does not look good. Lets try with the most recent node LTS

`nvm install 12.16.1`

then go to [http://localhost:3000/](http://localhost:3000/) and login with primero primer0!

You will see this

 ![image](https://support.primero.org/uploads/primero/original/1X/0ca5bd01cabd46339fd6e2c4048a5bd28f2fe389.png)

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [March 21, 2020, 1:50am UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/2 "2020-03-21T01:50:20Z")

</div>



---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [March 21, 2020, 6:34pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/4 "2020-03-21T18:34:43Z")

</div>

You need to make the log directory and file

> [@irlawrence](#):
>
> Next is to create a logging directory and file so that we can log errors
> 
> ```auto
> mkdir log
> touch log/development.log
> 
> ```

---

<div class="post-metadata">

**Author:** ![ekieyapojesus](https://support.primero.org/forum/letter_avatar_proxy/v4/letter/e/e56c9b/32.png) [@ekieyapojesus](https://support.primero.org/forum/u/ekieyapojesus)\
**Post date:** [May 5, 2020, 12:06pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/5 "2020-05-05T12:06:54Z")

</div>

After following all the steps, when I try to access the web interface I just receive a blank screen.

In the development log I found those lines at the end. Can you give me an hint on what can be the reason of that error?

 ![Capture_error_primero](https://support.primero.org/uploads/primero/original/1X/aea91dc8f7d30d6b76bd4a5b10d9d4d4a68cc11c.png)

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [May 5, 2020, 5:43pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/6 "2020-05-05T17:43:54Z")

</div>

This is an error as it cannot find the favicon and can be ignored. Does the front end compile?  
Instead of

> [@irlawrence](#):
>
> foreman start -f Procfile.dev

You can start the development Rails server on port 3000:

```auto
$ rails s

```

And in a separate terminal window, the development Rails Webpacker server:

```auto
$ npm run dev

```

then check the logs. Also why are you root? That does not look good

---

<div class="post-metadata">

**Author:** ![ekieyapojesus](https://support.primero.org/forum/letter_avatar_proxy/v4/letter/e/e56c9b/32.png) [@ekieyapojesus](https://support.primero.org/forum/u/ekieyapojesus)\
**Post date:** [May 5, 2020, 7:18pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/7 "2020-05-05T19:18:46Z")

</div>

Same error. The front end gives a blank page.  
Here the output of the development log file

 ![Capture_error_primero2](https://support.primero.org/uploads/primero/original/1X/27b2aa077be12aa28427688ffc81a4950604ac43.png)  
I have also perform the same installation with a user who is not root and I got exactly the same result.

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [May 6, 2020, 10:55am UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/8 "2020-05-06T10:55:54Z")

</div>

In general you should never be root on a linux system…just use sudo as shown in the example above.  
Can you paste your .bashrc file ?

---

<div class="post-metadata">

**Author:** ![ekieyapojesus](https://support.primero.org/forum/letter_avatar_proxy/v4/letter/e/e56c9b/32.png) [@ekieyapojesus](https://support.primero.org/forum/u/ekieyapojesus)\
**Post date:** [May 6, 2020, 2:04pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/9 "2020-05-06T14:04:26Z")

</div>

I have performed another installation with a user and I used sudo when needed (as shown in the tutorial). I got the same result.

Here my bashrc content

> ```
> case $- in
> *i*) ;;
> *) return;;
> esac
> 
> HISTCONTROL=ignoreboth
> 
> shopt -s histappend
> 
> HISTSIZE=1000
> HISTFILESIZE=2000
> 
> shopt -s checkwinsize
> 
> [-x /usr/bin/lesspipe] && eval "$(SHELL=/bin/sh lesspipe)"
> 
> if [-z "${debian_chroot:-}"] && [-r /etc/debian_chroot]; then
> debian_chroot=$(cat /etc/debian_chroot)
> fi
> 
> case "$TERM" in
> xterm-color|*-256color) color_prompt=yes;;
> esac
> 
> if [-n "$force_color_prompt"]; then
> if [-x /usr/bin/tput] && tput setaf 1 >&/dev/null; then
> color_prompt=yes
> else
> color_prompt=
> fi
> fi
> 
> if ["$color_prompt" = yes]; then
> PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
> else
> PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
> fi
> unset color_prompt force_color_prompt
> 
> case "$TERM" in
> xterm*|rxvt*)
> PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
> ;;
> *)
> ;;
> esac
> 
> if [-x /usr/bin/dircolors]; then
> test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
> alias ls='ls --color=auto'
>     
> alias grep='grep --color=auto'
> alias fgrep='fgrep --color=auto'
> alias egrep='egrep --color=auto'
> fi
> 
> alias ll='ls -alF'
> alias la='ls -A'
> alias l='ls -CF'
> 
> alias alert='notify-send --urgency=low -i "$([$? = 0] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
> 
> if [-f ~/.bash_aliases]; then
> . ~/.bash_aliases
> fi
> 
> if ! shopt -oq posix; then
> if [-f /usr/share/bash-completion/bash_completion]; then
> . /usr/share/bash-completion/bash_completion
> elif [-f /etc/bash_completion]; then
> . /etc/bash_completion
> fi
> fi
> export PRIMERO_SECRET_KEY_BASE=PRIMERO_SECRET_KEY_BASE
> export DEVISE_SECRET_KEY=DEVISE_SECRET_KEY
> export DEVISE_JWT_SECRET_KEY=DEVISE_JWT_SECRET_KEY
> 
> export NVM_DIR="$HOME/.nvm"
> [-s "$NVM_DIR/nvm.sh"] && \. "$NVM_DIR/nvm.sh" # This loads nvm
> [-s "$NVM_DIR/bash_completion"] && \. "$NVM_DIR/bash_completion"
> 
> ```

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [May 7, 2020, 8:46pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/10 "2020-05-07T20:46:54Z")

</div>

what are your node and ruby versions ?  
Are there any errors in your browsers developer tools?  
is there anything in log/development.log ?

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [May 7, 2020, 8:51pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/11 "2020-05-07T20:51:22Z")

</div>

> [@irlawrence](#):
>
> rails db:create rails db:migrate rails db:seed

all finished fine?

> [@irlawrence](#):
>
> sudo ./compose.local.sh up -d postgres sudo ./compose.local.sh run solr make-primero-core.sh primero-test sudo ./compose.local.sh up -d solr

are running?

---

<div class="post-metadata">

**Author:** ![omgalvan.86](https://support.primero.org/forum/letter_avatar_proxy/v4/letter/o/e8c25b/32.png) [@omgalvan.86](https://support.primero.org/forum/u/omgalvan.86)\
**Post date:** [May 8, 2020, 3:19am UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/12 "2020-05-08T03:19:44Z")

</div>

Hi, I’m working with [ekieyapojesus](https://support.primero.org/forum/u/ekieyapojesus). I’ve followed these exact steps using Ruby 2.6.6, since using Ruby 2.6.5 would throw the following error when doing `rails db:create`:

```auto
    Ignoring executable-hooks-1.6.0 because its extensions are not built. Try: gem pristine executable-hooks --version 1.6.0
    Ignoring gem-wrappers-1.4.0 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.4.0
    Traceback (most recent call last):
        4: from bin/rails:3:in `<main>'
        3: from bin/rails:3:in `require_relative'
        2: from /home/martin/primero/config/boot.rb:3:in `<top (required)>'
        1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
    /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- bundler/setup (LoadError)

```

On the other hand, I saw the following messages when doing `npm install`:

```auto
npm WARN base64-arraybuffer-es6@0.5.0 requires a peer of core-js-bundle@^3.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN chai-immutable@1.6.0 requires a peer of chai@>= 2.0.0 < 4 but none is installed. You must install peer dependencies yourself.
npm WARN connected-react-router@6.8.0 requires a peer of seamless-immutable@^7.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN mui-datatables@2.14.0 requires a peer of @material-ui/core@^3.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN mui-datatables@2.14.0 requires a peer of @material-ui/icons@^3.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN typeson@5.18.2 requires a peer of core-js-bundle@^3.6.4 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

```

Installing these dependencies through `npm install --save-dev` does nothing.

All the other commands you mentioned are running fine. The only detail I noticed is that the `rails db:*` commands are showing:

```auto
warning: parser/current is loading parser/ruby26, which recognizes
warning: 2.6.2-compliant syntax, but you are running 2.6.6.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
Rspec not installed--omitting tasks

```

I’m using node 12.16.3, so I never saw the build error mentioned in the guide.

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [May 8, 2020, 8:22am UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/13 "2020-05-08T08:22:59Z")

</div>

Maybe the ruby error on 2.6.5 is the issue?

What does `gem env` and `echo $GEM_PATH` output? Are you using Ruby Version Manager in the tutorial to handle versions and if so what version were you using to run the `bundle install` command?

---

<div class="post-metadata">

**Author:** ![omgalvan.86](https://support.primero.org/forum/letter_avatar_proxy/v4/letter/o/e8c25b/32.png) [@omgalvan.86](https://support.primero.org/forum/u/omgalvan.86)\
**Post date:** [May 8, 2020, 8:55pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/14 "2020-05-08T20:55:20Z")

</div>

Yes, I’m using rvm as indicated here. I tried `bundle install` with both versions, and it seems to work fine with 2.6.6. With 2.6.5, however, I see the following output:

`Your Ruby version is 2.6.5, but your Gemfile specified 2.6.6`

which is why I switched to 2.6.6. Plus, as soon as I step into the `primero` directory I get a message saying:

```auto
Required ruby-2.6.6 is not installed.
To install do: 'rvm install "ruby-2.6.6"'

```

I’ll check `gem env` and `GEM_PATH` later and update this. Thanks.

---

<div class="post-metadata">

**Author:** ![omgalvan.86](https://support.primero.org/forum/letter_avatar_proxy/v4/letter/o/e8c25b/32.png) [@omgalvan.86](https://support.primero.org/forum/u/omgalvan.86)\
**Post date:** [May 9, 2020, 3:19am UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/15 "2020-05-09T03:19:11Z")

</div>

Here’s `gem env` for 2.6.5:

```auto
RubyGems Environment:
  - RUBYGEMS VERSION: 3.0.6
  - RUBY VERSION: 2.6.5 (2019-10-01 patchlevel 114) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/martin/.rvm/gems/ruby-2.6.5
  - USER INSTALLATION DIRECTORY: /home/martin/.gem/ruby/2.6.0
  - RUBY EXECUTABLE: /usr/share/rvm/rubies/ruby-2.6.5/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /home/martin/.rvm/gems/ruby-2.6.5/bin
  - SPEC CACHE DIRECTORY: /home/martin/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/martin/.rvm/gems/ruby-2.6.5
     - /usr/share/rvm/rubies/ruby-2.6.5/lib/ruby/gems/2.6.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/martin/.rvm/gems/ruby-2.6.5/bin
     - /home/martin/.rvm/gems/ruby-2.6.5@global/bin
     - /usr/share/rvm/rubies/ruby-2.6.5/bin
     - /usr/share/rvm/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin
     - /usr/games
     - /usr/local/games
     - /snap/bin

```

`GEM_PATH` is set to `/home/martin/.rvm/gems/ruby-2.6.5:/home/martin/.rvm/gems/ruby-2.6.5@global`.

For 2.6.6 it’s the same but with all instances of 2.6.5 replaced by 2.6.6, and `RUBYGEMS VERSION` replaced by 3.0.8.

---

<div class="post-metadata">

**Author:** ![omgalvan.86](https://support.primero.org/forum/letter_avatar_proxy/v4/letter/o/e8c25b/32.png) [@omgalvan.86](https://support.primero.org/forum/u/omgalvan.86)\
**Post date:** [May 9, 2020, 3:23am UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/16 "2020-05-09T03:23:07Z")

</div>

I also noticed that the following appears in the output of `./build.sh postgres`:

```auto
++ docker build -f postgres/Dockerfile . -t primero/postgres:latest -t uniprimeroxacrdev.azurecr.io/primero/postgres:latest
free(): invalid pointer
SIGABRT: abort
PC=0x7f4401757e97 m=0 sigcode=18446744073709551610
signal arrived during cgo execution

```

After this, however, the process continues and finishes with no other errors. Something similar happens when doing `./build.sh solr`.

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [May 9, 2020, 9:55am UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/17 "2020-05-09T09:55:53Z")

</div>

> [@omgalvan.86](#):
>
> free(): invalid pointer SIGABRT: abort PC=0x7f4401757e97 m=0 sigcode=18446744073709551610

This may be caused as you have docker compose installed.

```auto
sudo apt-get remove docker-compose
sudo apt autoremove

```

Try to get 2.6.5 working.It’s possible your bundler installation is corrupt or missing so try and install it again

```auto
gem install bundler

```

---

<div class="post-metadata">

**Author:** ![omgalvan.86](https://support.primero.org/forum/letter_avatar_proxy/v4/letter/o/e8c25b/32.png) [@omgalvan.86](https://support.primero.org/forum/u/omgalvan.86)\
**Post date:** [May 9, 2020, 5:20pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/18 "2020-05-09T17:20:13Z")

</div>

I don’t think “getting 2.6.5 working” is the way to fix this. As soon as I try to run `bundle install`, I simply get an error saying that I should use 2.6.6, as that’s what Primero’s Gemfile says.

I don’t see how this could ever work with 2.6.5 without modifying the Primero sources. This seems like an error on your side.

---

<div class="post-metadata">

**Author:** ![omgalvan.86](https://support.primero.org/forum/letter_avatar_proxy/v4/letter/o/e8c25b/32.png) [@omgalvan.86](https://support.primero.org/forum/u/omgalvan.86)\
**Post date:** [May 9, 2020, 5:28pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/19 "2020-05-09T17:28:42Z")

</div>

Btw, if I remove docker-compose, the `sudo ./compose.local.sh up -d postgres` step fails:

`./compose.sh: 6: exec: docker-compose: not found`

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [May 11, 2020, 6:45pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/20 "2020-05-11T18:45:42Z")

</div>

> [@omgalvan.86](#):
>
> I don’t think “getting 2.6.5 working” is the way to fix this. As soon as I try to run `bundle install` , I simply get an error saying that I should use 2.6.6, as that’s what Primero’s Gemfile says.

I just meant that this was the version working in the tutorial

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [May 11, 2020, 6:48pm UTC](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300/21 "2020-05-11T18:48:32Z")

</div>

> [@omgalvan.86](#):
>
> ./compose.sh: 6: exec: docker-compose: not found

Try installing docker compose from the docker site now

[Next page](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300.md?page=2)
