DEV Community

Installing Forem in Linux

Akhil Naidu on November 30, 2020

This post is on the request of @benki In this article, I focus less on my commentary and prefer more clarity in command execution. So if you find ...
Collapse
 
sidcraftscode profile image
sid

I got this error

rails aborted!
PG::ConnectionBad: fe_sendauth: no password supplied
/home/sid/forem/app/lib/database.rb:9:in `table_exists?'
/home/sid/forem/app/models/profile.rb:53:in `refresh_attributes!'
/home/sid/forem/app/models/profile.rb:62:in `<class:Profile>'
/home/sid/forem/app/models/profile.rb:1:in `<main>'
/home/sid/forem/app/models/user.rb:60:in `block (2 levels) in <class:User>'
/home/sid/forem/app/models/user.rb:48:in `<class:User>'
/home/sid/forem/app/models/user.rb:1:in `<main>'
/home/sid/forem/vendor/cache/devise-0cd72a56f984/lib/devise.rb:316:in `get'
/home/sid/forem/vendor/cache/devise-0cd72a56f984/lib/devise/mapping.rb:83:in `to'
/home/sid/forem/vendor/cache/devise-0cd72a56f984/lib/devise/mapping.rb:78:in `modules'
/home/sid/forem/vendor/cache/devise-0cd72a56f984/lib/devise/mapping.rb:95:in `routes'
/home/sid/forem/vendor/cache/devise-0cd72a56f984/lib/devise/mapping.rb:162:in `default_used_route'
/home/sid/forem/vendor/cache/devise-0cd72a56f984/lib/devise/mapping.rb:72:in `initialize'
/home/sid/forem/vendor/cache/devise-0cd72a56f984/lib/devise.rb:346:in `new'
/home/sid/forem/vendor/cache/devise-0cd72a56f984/lib/devise.rb:346:in `add_mapping'
/home/sid/forem/vendor/cache/devise-0cd72a56f984/lib/devise/rails/routes.rb:243:in `block in devise_for'
/home/sid/forem/vendor/cache/devise-0cd72a56f984/lib/devise/rails/routes.rb:242:in `each'
/home/sid/forem/vendor/cache/devise-0cd72a56f984/lib/devise/rails/routes.rb:242:in `devise_for'
/home/sid/forem/config/routes.rb:10:in `block in <main>'
/home/sid/forem/config/routes.rb:3:in `<main>'
/home/sid/forem/config/application.rb:73:in `block in <class:Application>'
/home/sid/forem/config/environment.rb:5:in `<main>'
bin/rails:4:in `<main>'
Tasks: TOP => search:setup => environment
(See full trace by running task with --trace)

== Command ["RAILS_ENV=\"test\" bin/rails search:setup"] failed ==
Enter fullscreen mode Exit fullscreen mode
Collapse
 
akhilnaidu profile image
Akhil Naidu

Hey, the problem you are facing here is because of the non-configuration of DATABASE_URL properly.

I'm updating this article again. Until you see a clear indication at the top of the post saying Updated with 2021, consider it work under progress.

Meanwhile, you can have a quick peek at where this is going. I'm actively updating this article rather than in passive mode.

Collapse
 
ntkien2192 profile image
Nguyễn Trung Kien

Thank. Your tutorial work well. But after i add domain

APP_DOMAIN="domain.com"
APP_PROTOCOL="https://"

then my forum only can open with domain.com:3000. Any way i can remove port 3000 and change http to https

Collapse
 
akhilnaidu profile image
Akhil Naidu

A much better option would be, for development.

Use nginx as a reverse proxy for port 3000.

Collapse
 
ntkien2192 profile image
Nguyễn Trung Kien

Thanks a lot. Now i get a new one when i try to login with social acc call: ActionController:: InvalidAuthenticityToken

Collapse
 
ntkien2192 profile image
Nguyễn Trung Kien

i Follow this one, My Forem open success but i get ActionController:: InvalidAuthenticityToken everytime i try to login.

Collapse
 
ntkien2192 profile image
Nguyễn Trung Kien

Can i fix it with some step?

Collapse
 
akhilnaidu profile image
Akhil Naidu

Hey, if you are interested in hosting Forem in production. This is not the preferred way.

I'm actually working on a project to help Forem selfhosters. If you are interested, I can provide you access to the pre-release version.

Thread Thread
 
ntkien2192 profile image
Nguyễn Trung Kien

thank a lot, please add me with email ntkien2192@gmail.com

Thread Thread
 
akhilnaidu profile image
Akhil Naidu

I will create an account for you and will let you know, once it is done. We are few days behind to release v0.3

Thread Thread
 
ntkien2192 profile image
Nguyễn Trung Kien

thanks

Collapse
 
bientran profile image
Fire Keeper

How do I run forem for the production site?
Could you describe a little bit about production configuration?
Thanks!

Collapse
 
akhilnaidu profile image
Akhil Naidu
Collapse
 
akhilnaidu profile image
Akhil Naidu

Updated :)

Collapse
 
coderlifeisawesome profile image
lifeascoder

I am not able to login using my Github account or neither sign up. It is showing an error and I am stuck with it. What to do?

Collapse
 
ngtrian profile image
Tri Ân

I'm not sure how and how about Now open 3 Terminal, the three boxes below indicate 3 different terminals paragraph

Collapse
 
akhilnaidu profile image
Akhil Naidu

Hello, yes it means that.

But if you are following this post, there is no need for you to configure anything related to elastic search. Forem removed the need of it.

You can follow my posts over here for updated content: forem.dev/akhil/series

Collapse
 
luuvuong profile image
luuvuong • Edited

/start web container not start by problem connect postgresql
Image description