Getting errors when setting up Discourse dev environment on Ubuntu


(| full stack virgin) #1

@techAPJ, will this tutorial still work for development purposes?
any updates being added?

i have not been successful installing discourse using this tutorial
but is successful with the cloud-based tutorial.

the reason why i need the functional development installation is that i want to try the Ning migration script. Im not really sure if the script works for cloud installation tutorial.


Beginners Guide to Install Discourse on Ubuntu for Development
(Arpit Jalan) #2

I referred this howto six months ago to set up dev env on my Ubuntu machine and it worked, so it should work for you too.

Which step are you stuck on? What is the error you are getting?


(| full stack virgin) #3

im destroying my droplet now, i’ll reinstall it again using this tutorial and will give you feedback where i’m stuck coz last time, it was with psql -d discourse user testing.

ill give you feedback with in the day.


(| full stack virgin) #5

@techAPJ
this is actually the error i get


(Alan Tan) #6

There should be more logs when the gem fails to install. Anyway I remembered that there were issues with Ruby 2.2.2 and eventmachine sometime back which was fixed in eventmachine. Not sure if it regressed. Try setting up your dev environment with Ruby 2.2.3 instead?


(Arpit Jalan) #7

I just updated the install-rails script to download and use Ruby version 2.2.3 (instead of 2.2.2)


(| full stack virgin) #8

do i need to run again bundler istall or bash <(wget -qO- https://raw.githubusercontent.com/techAPJ/install-rails/master/linux)

to get the gem?

no need for me to restart the installation?


(| full stack virgin) #9

i’ve reinstalled ruby but im still getting this one


(| full stack virgin) #10


(Alan Tan) #12

g++ command not found

Seems like the script is missing a dependency?

Someone had the same problem a month ago in the posts above. Scroll up :wink:


(| full stack virgin) #13

oh!..i guess he was unsuccessful or successful?

i hope he was able to succeed so that i can learn from him


(Alan Tan) #15

Seems like he was sucessful after installing build-essentials.

Try running sudo apt-get install build-essentials?


(| full stack virgin) #16

yap. working on it. :smile: thanks man


(| full stack virgin) #17


(| full stack virgin) #18

@techAPJ,

I’m stuck at this part for almost an hour now.


(Sam Saffron) #19

recommend you read up a bit about general rails setup.

your root user does not seem to have access to a pg db on the box called discourse_development

you can confirm that by running

psql discourse_development

Beginners Guide to Install Discourse on Ubuntu for Development
(| full stack virgin) #20

if not for that ning migration script, i wouldnt pursue the hassle of setting up discourse w/ dev environment.
really don’t know how to run mingration script thru production discourse set-up :frowning:


(| full stack virgin) #21

i think i pretty much followed everything, adding “root” user, until i tested the rails server, and visited localhost, but;

i think this journey ends here. there’s nothing else i can do to run this dev environment. :smiley:


(Arpit Jalan) #22

Since you are setting up dev env on a remote server, replace localhost with your server’s IP address. For example: 123.456.78.90:3000


(| full stack virgin) #23

@techAPJ, i’ll look into that. i’ll re-create another droplet.