Forem Creators and Builders

Cover image for Installing Forem on Ubuntu 18.04 (Part 7 - Forem)
Dawood Khan Masood
Dawood Khan Masood

Posted on • Updated on

Installing Forem on Ubuntu 18.04 (Part 7 - Forem)

If there is anything you would like me to change, please comment. This section of the guide assumes you have already installed Elastic Search from the previous article.

An Alt Text

Prerequisites

Update your package lists by typing:

$ sudo apt-get update
Enter fullscreen mode Exit fullscreen mode

Install the development version of libcurl4 by typing:

$ sudo apt-get install libcurl4 libcurl4-openssl-dev -y
Enter fullscreen mode Exit fullscreen mode

Installing Forem

Clone 'Forem' from the source repository into '~/forem' by typing:

$ git clone https://github.com/forem/forem.git ~/forem
$ cd ~/forem
Enter fullscreen mode Exit fullscreen mode

Install bundler by typing:

$ gem install bundler
Enter fullscreen mode Exit fullscreen mode

Create 'application.yml' from the sample template (sample_application.yml). To do so, type:

$ cp .env_sample .env
Enter fullscreen mode Exit fullscreen mode

Run the ruby 'setup' file:

$ bin/setup
Enter fullscreen mode Exit fullscreen mode

Verify Forem is installed by typing:

$ bin/startup
Enter fullscreen mode Exit fullscreen mode

The output will be something like this:

== STARTING UP ==
14:05:32 web.1       | started with pid 68343
14:05:32 webpacker.1 | started with pid 68344
14:05:32 sidekiq.1   | started with pid 68345
14:05:37 webpacker.1 | ℹ 「wds」: Project is running at http://0.0.0.0:3035/
14:05:37 webpacker.1 | ℹ 「wds」: webpack output is served from /packs/
14:05:37 webpacker.1 | ℹ 「wds」: Content not from webpack is served from /home/hackhex/forem/public/packs
14:05:37 webpacker.1 | ℹ 「wds」: 404s will fallback to /index.html
Enter fullscreen mode Exit fullscreen mode

Discussion (3)

Collapse
akhil profile image
Akhil Naidu

Create 'application.yml' from the sample template (sample_application.yml). To do so, type:

cp ./config/sample_application.yml ./config/application.yml This command has been updated to cp .env_sample .env in the Forem documentation.

So try to check it and if required update this guide accordingly. I updated it in Forem in Docker Guide, to stay authentic to Forem guide.

Collapse
avalerionv profile image
Dawood Khan Masood Author

Missed that part! Thank you for the correction. :)

Collapse
madhan profile image
Madhan • Edited

Hi Akhil,

When i run the cmd "bin/setup" i am getting below error,

**ubuntu@ip-172-31-22-238:~/forem$ bin/setup
== Installing dependencies ==
The Gemfile's dependencies are satisfied
Successfully installed foreman-0.87.2
Parsing documentation for foreman-0.87.2
Done installing documentation for foreman after 0 seconds
1 gem installed
Yarn executable was not detected in the system.
Download Yarn at yarnpkg.com/en/docs/install

== Copying sample files ==

== Initializing the application ==

== Preparing database ==
rails aborted!
ActiveRecord::ConnectionNotEstablished: fe_sendauth: no password supplied
/home/ubuntu/forem/bin/rails:5:in <top (required)>'
/home/ubuntu/forem/bin/spring:10:in
require'
/home/ubuntu/forem/bin/spring:10:in block in <top (required)>'
/home/ubuntu/forem/bin/spring:7:in
'

Caused by:
PG::ConnectionBad: fe_sendauth: no password supplied
/home/ubuntu/forem/bin/rails:5:in <top (required)>'
/home/ubuntu/forem/bin/spring:10:in
require'
/home/ubuntu/forem/bin/spring:10:in block in <top (required)>'
/home/ubuntu/forem/bin/spring:7:in
'
Tasks: TOP => db:prepare
(See full trace by running task with --trace)

== Command ["bin/rails app_initializer:setup forem:setup"] failed ==**