frold
February 24, 2018, 8:20am
1
I would like to play with the files in discourse - Im not a coder, but I have some tweeks I would like to see if Im able to add. The best way to learn is when you have something you will achieve
I have a little knowledge from php. There you can change a file and see the result of the changes immedealy.
In my discourse server Im not able to finde the .rb files I would like to find. Is that because I need a dev box?
This ruby universe seems to have a steep learning curve… :S
Best place to start is here
There are a few ‘how to start’ guides for working with Discourse already and a wealth of useful info on meta, but I thought it might help to give an insight to the mental processes of starting from little, if any, prior coding experience to building substantial Discourse plugins.
Discourse is written by experienced developers and has a large codebase. This can feel intimidating. This intimidation factor can be a significant barrier for novice developers. This is a kind of ‘psychological primer’…
9 Likes
frold
February 24, 2018, 9:18am
3
I will look at it, thanks
1 Like
frold
February 25, 2018, 11:39am
4
But it is still not clear to me: Can I on a live setup/site - browse the .rp files via my SSH connection - edit them and see if my changes work?
If I in shell do
cd /var/discourse
Then:
./launcher rebuild app
Then
ls -ls
I get this - where do I find the files?
pfaffman
(Jay Pfaffman)
February 25, 2018, 3:00pm
5
You need to set up a development environment to edit files and see changes. In production, lots of stuff is cached, so changes don’t show up.
If you want to see the files
cd /var/discourse
. /launcher enter app
cd src
ls
5 Likes
frold
March 1, 2018, 8:32am
6
I was now able to follow this guide:
This guide covers installation instructions for a macOS development environment, for production guides see: Install Discourse in production with the official, supported instructions
So you want to set up Discourse on macOS to hack on and develop with?
We’ll assume that you don’t have Ruby/Rails/Postgres/Redis installed on your Mac. Let’s begin !
Install Discourse Dependencies
Run this script in your Terminal (or equivalent), to setup your machine for Discourse developmen…
I would like to edit and see if I was able to add some changes to: https://github.com/discourse/onebox/blob/master/lib/onebox/engine/amazon_onebox.rb
But Im not able to find the file on my mac?
Damn it have a steep learning curve this thing…
Wish me back to the old apache days…
techAPJ
(Arpit Jalan)
March 1, 2018, 8:34am
7
To edit onebox files, you need to clone source code for onebox gem.
2 Likes
frold
March 1, 2018, 8:37am
8
techAPJ
(Arpit Jalan)
March 1, 2018, 8:39am
9
That was for cloning discourse core repo. If you want to hack on onebox gem, you will need to clone the source code for that gem as well.
frold
March 1, 2018, 8:43am
10
Okay, then I dont know anything…
What is the difference of a dev box and a running site then?
I thought setting up a dev box I would be able to edit files…
Seems now I need to follow another tutorial…?
This is only for very technical users, like in very - I give up
You have the core files and then you have various modules that discourse rely on - some developed by discourse and some not. Onebox is one of those modules.
frold
March 1, 2018, 1:01pm
12
ahh, now I understand.
But what I need to edit is the file that renders the amazon data like this:
Vinay Kumar MBBS MD FRCPath, Abul K. Abbas MBBS, Jon C. Aster MD PhD
4.1 out of 5 stars,
ISBN: 978-0323353175,
Elsevier,
April 11, 2017,
$69.18
Its give me the same output at my dev box on my mac. I thought it was the file mention above…
What files is it then… :S
This topic was automatically closed after 2296 days. New replies are no longer allowed.