diff --git a/app/assets/javascripts/discourse/tests/fixtures/search-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/search-fixtures.js index 9564af10538..0855839ba35 100644 --- a/app/assets/javascripts/discourse/tests/fixtures/search-fixtures.js +++ b/app/assets/javascripts/discourse/tests/fixtures/search-fixtures.js @@ -159,7 +159,7 @@ export default { uploaded_avatar_id: 3281, created_at: "2014-04-12T22:22:07.930Z", cooked: - '

So you want to set up Discourse on Ubuntu to hack on and develop with?

\n\n

We\'ll assume that you don\'t have Ruby/Rails/Postgre/Redis installed on your Ubuntu system. Let\'s begin!

\n\n

Although this guide assumes that you are using Ubuntu, but the set-up instructions will work fine for any Debian based distribution.

\n\n

(If you want to install Discourse for production use, see our install guide)

\n\n

Install Discourse Dependencies

\n\n

Run this script in terminal, to setup Rails development environment:

\n\n
bash <(wget -qO- https://raw.githubusercontent.com/techAPJ/install-rails/master/linux)
\n\n

\n\n

This will install following new packages on your system:

\n\n\n\n

Install Phantomjs:

\n\n

For 32 bit machine:

\n\n
cd /usr/local/share\nsudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-i686.tar.bz2\nsudo tar xvf phantomjs-1.9.8-linux-i686.tar.bz2\nsudo rm phantomjs-1.9.8-linux-i686.tar.bz2\nsudo ln -s /usr/local/share/phantomjs-1.9.8-linux-i686/bin/phantomjs /usr/local/bin/phantomjs\ncd
\n\n

For 64 bit machine:

\n\n
cd /usr/local/share\nsudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2\nsudo tar xvf phantomjs-1.9.8-linux-x86_64.tar.bz2\nsudo rm phantomjs-1.9.8-linux-x86_64.tar.bz2\nsudo ln -s /usr/local/share/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs\ncd
\n\n

\n\n

In case you have any of this package pre-installed and don\'t want to run entire script, see the script and pick the packages you don\'t have currently installed. The script is fine-tuned for Discourse, and includes all the packages required for Discourse installation.

\n\n

Now that we have installed Discourse dependencies, let\'s move on to install Discourse itself.

\n\n

Clone Discourse

\n\n

Clone the Discourse repository in ~/discourse folder:

\n\n
git clone https://github.com/discourse/discourse.git ~/discourse
\n\n

\n\n

Setup Database

\n\n

Open psql prompt as postgre user

\n\n
sudo -u postgres psql postgres
\n\n

\n\n

Create role with the same name as your ubuntu system username with discourse as password:

\n\n
CREATE ROLE discourse WITH LOGIN ENCRYPTED PASSWORD \'discourse\' CREATEDB SUPERUSER;
\n\n

In the above command, I named the role as discourse, this means that my ubuntu system username is discourse. (It is necessary for role name to be same as system username, otherwise migrations will not run)

\n\n

Check that you have successfully created discourse role:

\n\n
\\du
\n\n

\n\n

Create discourse_development and discourse_test database:

\n\n
CREATE DATABASE discourse_development WITH OWNER discourse ENCODING \'UTF8\' TEMPLATE template0;\nCREATE DATABASE discourse_test WITH OWNER discourse ENCODING \'UTF8\' TEMPLATE template0;
\n\n

\n\n

Exit psql prompt by pressing ctrld

\n\n

Now access psql prompt in discourse_development database as discourse user:

\n\n
psql -d discourse_development -U discourse -h localhost
\n\n

When prompted for password, provide the password which you set at the time of creating role, if you followed the guide as is, the password is discourse

\n\n

Run following commands, separately:

\n\n
CREATE EXTENSION pg_trgm;\nCREATE EXTENSION hstore;
\n\n

\n\n

Exit psql prompt by pressing ctrld

\n\n

Now access psql prompt in discourse_test database as discourse user:

\n\n
psql -d discourse_test -U discourse -h localhost
\n\n

When prompted for password, provide the password which you set at the time of creating role, if you followed the guide as is, the password is discourse

\n\n

Run following commands, separately:

\n\n
CREATE EXTENSION pg_trgm;\nCREATE EXTENSION hstore;
\n\n

\n\n

Exit psql prompt by pressing ctrld

\n\n

You have set-up the database successfully!

\n\n

Bootstrap Discourse

\n\n

Switch to your Discourse folder:

\n\n
cd ~/discourse
\n\n

Install the needed gems

\n\n
bundle install
\n\n

\n\n

Now that you have successfully configured database connection, run this command:

\n\n
bundle exec rake db:migrate db:test:prepare db:seed_fu
\n\n

Now, try running the specs:

\n\n
bundle exec rake autospec
\n\n

\n\n

Start rails server:

\n\n
bundle exec rails server
\n\n

\n\n

You should now be able to connect to discourse app on http://localhost:3000 - try it out!

\n\n

\n\n

Configure Mail and Create New Account

\n\n

We will use MailCatcher to serve emails in development environment. Install and run MailCatcher:

\n\n
gem install mailcatcher\nmailcatcher --http-ip 0.0.0.0
\n\n

Create new account:

\n\n

\n\n

Check confirmation email by going to MailCatcher web interface at http://localhost:1080/

\n\n

\n\n

If you did not receive the email, try running this in console: bundle exec sidekiq -q default

\n\n

Click the confirmation link and your account will be activated!

\n\n

\n\n

Access Admin

\n\n

Now, to make your account as admin, run the following commands in rails console:

\n\n
RAILS_ENV=development bundle exec rails c\nu = User.last\nu.admin = true\nu.save
\n\n

\n\n

Once you execute the above commands successfully, check out your Discourse account again:

\n\n

\n\n

Congratulations! You are now the admin of your own Discourse installation!

\n\n

Happy hacking!

\n\n

If anything needs to be improved in this guide, feel free to ask on meta.discourse.org, or even better, submit a pull request.

', + '

So you want to set up Discourse on Ubuntu to hack on and develop with?

\n\n

We\'ll assume that you don\'t have Ruby/Rails/Postgre/Redis installed on your Ubuntu system. Let\'s begin!

\n\n

Although this guide assumes that you are using Ubuntu, but the set-up instructions will work fine for any Debian based distribution.

\n\n

(If you want to install Discourse for production use, see our install guide)

\n\n

Install Discourse Dependencies

\n\n

Run this script in terminal, to setup Rails development environment:

\n\n
bash <(wget -qO- https://raw.githubusercontent.com/techAPJ/install-rails/master/linux)
\n\n

\n\n

This will install following new packages on your system:

\n\n\n\n

Install Phantomjs:

\n\n

For 32 bit machine:

\n\n
cd /usr/local/share\nsudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-i686.tar.bz2\nsudo tar xvf phantomjs-1.9.8-linux-i686.tar.bz2\nsudo rm phantomjs-1.9.8-linux-i686.tar.bz2\nsudo ln -s /usr/local/share/phantomjs-1.9.8-linux-i686/bin/phantomjs /usr/local/bin/phantomjs\ncd
\n\n

For 64 bit machine:

\n\n
cd /usr/local/share\nsudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2\nsudo tar xvf phantomjs-1.9.8-linux-x86_64.tar.bz2\nsudo rm phantomjs-1.9.8-linux-x86_64.tar.bz2\nsudo ln -s /usr/local/share/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs\ncd
\n\n

\n\n

In case you have any of this package pre-installed and don\'t want to run entire script, see the script and pick the packages you don\'t have currently installed. The script is fine-tuned for Discourse, and includes all the packages required for Discourse installation.

\n\n

Now that we have installed Discourse dependencies, let\'s move on to install Discourse itself.

\n\n

Clone Discourse

\n\n

Clone the Discourse repository in ~/discourse folder:

\n\n
git clone https://github.com/discourse/discourse.git ~/discourse
\n\n

\n\n

Setup Database

\n\n

Open psql prompt as postgre user

\n\n
sudo -u postgres psql postgres
\n\n

\n\n

Create role with the same name as your ubuntu system username with discourse as password:

\n\n
CREATE ROLE discourse WITH LOGIN ENCRYPTED PASSWORD \'discourse\' CREATEDB SUPERUSER;
\n\n

In the above command, I named the role as discourse, this means that my ubuntu system username is discourse. (It is necessary for role name to be same as system username, otherwise migrations will not run)

\n\n

Check that you have successfully created discourse role:

\n\n
\\du
\n\n

\n\n

Create discourse_development and discourse_test database:

\n\n
CREATE DATABASE discourse_development WITH OWNER discourse ENCODING \'UTF8\' TEMPLATE template0;\nCREATE DATABASE discourse_test WITH OWNER discourse ENCODING \'UTF8\' TEMPLATE template0;
\n\n

\n\n

Exit psql prompt by pressing ctrld

\n\n

Now access psql prompt in discourse_development database as discourse user:

\n\n
psql -d discourse_development -U discourse -h localhost
\n\n

When prompted for password, provide the password which you set at the time of creating role, if you followed the guide as is, the password is discourse

\n\n

Run following commands, separately:

\n\n
CREATE EXTENSION pg_trgm;\nCREATE EXTENSION hstore;
\n\n

\n\n

Exit psql prompt by pressing ctrld

\n\n

Now access psql prompt in discourse_test database as discourse user:

\n\n
psql -d discourse_test -U discourse -h localhost
\n\n

When prompted for password, provide the password which you set at the time of creating role, if you followed the guide as is, the password is discourse

\n\n

Run following commands, separately:

\n\n
CREATE EXTENSION pg_trgm;\nCREATE EXTENSION hstore;
\n\n

\n\n

Exit psql prompt by pressing ctrld

\n\n

You have set-up the database successfully!

\n\n

Bootstrap Discourse

\n\n

Switch to your Discourse folder:

\n\n
cd ~/discourse
\n\n

Install the needed gems

\n\n
bundle install
\n\n

\n\n

Now that you have successfully configured database connection, run this command:

\n\n
bundle exec rake db:migrate db:test:prepare db:seed_fu
\n\n

Now, try running the specs:

\n\n
bundle exec rake autospec
\n\n

\n\n

Start rails server:

\n\n
bundle exec rails server
\n\n

\n\n

You should now be able to connect to discourse app on http://localhost:3000 - try it out!

\n\n

\n\n

Configure Mail and Create New Account

\n\n

We will use MailCatcher to serve emails in development environment. Install and run MailCatcher:

\n\n
gem install mailcatcher\nmailcatcher --http-ip 0.0.0.0
\n\n

Create new account:

\n\n

\n\n

Check confirmation email by going to MailCatcher web interface at http://localhost:1080/

\n\n

\n\n

If you did not receive the email, try running this in console: bundle exec sidekiq -q default

\n\n

Click the confirmation link and your account will be activated!

\n\n

\n\n

Access Admin

\n\n

Now, to make your account as admin, run the following commands in rails console:

\n\n
RAILS_ENV=development bundle exec rails c\nu = User.last\nu.admin = true\nu.save
\n\n

\n\n

Once you execute the above commands successfully, check out your Discourse account again:

\n\n

\n\n

Congratulations! You are now the admin of your own Discourse installation!

\n\n

Happy hacking!

\n\n

If anything needs to be improved in this guide, feel free to ask on meta.discourse.org, or even better, submit a pull request.

', post_number: 1, post_type: 1, updated_at: "2015-06-22T17:24:20.607Z", @@ -249,7 +249,7 @@ export default { uploaded_avatar_id: 3281, created_at: "2014-05-19T16:59:51.082Z", cooked: - '

So you want to set up Discourse on Mac OS X to hack on and develop with?

\n\n

We\'ll assume that you don\'t have Ruby/Rails/Postgre/Redis installed on your Mac. Let\'s begin!

\n\n

(If you want to install Discourse for production use, see our install guide)

\n\n

Install Discourse Dependencies

\n\n

Run this script in terminal, to setup Rails development environment:

\n\n
bash <(curl -s https://raw.githubusercontent.com/techAPJ/install-rails/master/mac)
\n\n

This script will install following new packages on your system:

\n\n\n\n

In case you have any of this package pre-installed and don\'t want to run entire script, see the script and pick the packages you don\'t have currently installed. The script is fine-tuned for Discourse, and includes all the packages required for Discourse installation.

\n\n

Now that we have installed Discourse dependencies, let\'s move on to install Discourse itself.

\n\n

Clone Discourse

\n\n

Clone the Discourse repository in ~/discourse folder:

\n\n
git clone https://github.com/discourse/discourse.git ~/discourse
\n\n

\n\n

~ indicates home folder, so Discourse source code will be available in your home folder.

\n\n

Setup Database

\n\n

Open psql prompt:

\n\n
psql postgres
\n\n

\n\n

Create discourse_development and discourse_test database with your account short name specified as role:

\n\n
CREATE DATABASE discourse_development WITH OWNER techapj ENCODING \'UTF8\' TEMPLATE template0;\nCREATE DATABASE discourse_test WITH OWNER techapj ENCODING \'UTF8\' TEMPLATE template0;
\n\n

Note that in above commands I specified the role as techapj, this means that my short name is techapj, replace this with your own short name.

\n\n

\n\n

Exit psql prompt by pressing controld

\n\n

Now access psql prompt in discourse_development database as your short name user:

\n\n
psql -d discourse_development -U techapj -h localhost
\n\n

Run following commands, separately:

\n\n
CREATE EXTENSION pg_trgm;\nCREATE EXTENSION hstore;
\n\n

\n\n

Exit psql prompt by pressing controld

\n\n

Now access psql prompt in discourse_test database as your short name user:

\n\n
psql -d discourse_test -U techapj -h localhost
\n\n

Run following commands, separately:

\n\n
CREATE EXTENSION pg_trgm;\nCREATE EXTENSION hstore;
\n\n

\n\n

Exit psql prompt by pressing controld

\n\n

You have set-up the database successfully!

\n\n

Bootstrap Discourse

\n\n

Switch to your Discourse folder:

\n\n
cd ~/discourse
\n\n

Install the needed gems

\n\n
bundle install
\n\n

\n\n

Now that you have successfully installed gems, run this command:

\n\n
bundle exec rake db:migrate db:test:prepare db:seed_fu
\n\n

Try running the specs:

\n\n
bundle exec rake autospec
\n\n

\n\n

All the tests should pass.

\n\n

Start rails server:

\n\n
bundle exec rails server
\n\n

\n\n

You should now be able to connect with your Discourse app on http://localhost:3000 - try it out!

\n\n

\n\n

Create New Admin

\n\n

To create a new admin, run the following commands in rails console:

\n\n
RAILS_ENV=development bundle exec rake admin:create
\n\n

Just enter your input as suggested, you can create an admin account.

\n\n

\n\n

\n\n

Happy hacking!

', + '

So you want to set up Discourse on Mac OS X to hack on and develop with?

\n\n

We\'ll assume that you don\'t have Ruby/Rails/Postgre/Redis installed on your Mac. Let\'s begin!

\n\n

(If you want to install Discourse for production use, see our install guide)

\n\n

Install Discourse Dependencies

\n\n

Run this script in terminal, to setup Rails development environment:

\n\n
bash <(curl -s https://raw.githubusercontent.com/techAPJ/install-rails/master/mac)
\n\n

This script will install following new packages on your system:

\n\n\n\n

In case you have any of this package pre-installed and don\'t want to run entire script, see the script and pick the packages you don\'t have currently installed. The script is fine-tuned for Discourse, and includes all the packages required for Discourse installation.

\n\n

Now that we have installed Discourse dependencies, let\'s move on to install Discourse itself.

\n\n

Clone Discourse

\n\n

Clone the Discourse repository in ~/discourse folder:

\n\n
git clone https://github.com/discourse/discourse.git ~/discourse
\n\n

\n\n

~ indicates home folder, so Discourse source code will be available in your home folder.

\n\n

Setup Database

\n\n

Open psql prompt:

\n\n
psql postgres
\n\n

\n\n

Create discourse_development and discourse_test database with your account short name specified as role:

\n\n
CREATE DATABASE discourse_development WITH OWNER techapj ENCODING \'UTF8\' TEMPLATE template0;\nCREATE DATABASE discourse_test WITH OWNER techapj ENCODING \'UTF8\' TEMPLATE template0;
\n\n

Note that in above commands I specified the role as techapj, this means that my short name is techapj, replace this with your own short name.

\n\n

\n\n

Exit psql prompt by pressing controld

\n\n

Now access psql prompt in discourse_development database as your short name user:

\n\n
psql -d discourse_development -U techapj -h localhost
\n\n

Run following commands, separately:

\n\n
CREATE EXTENSION pg_trgm;\nCREATE EXTENSION hstore;
\n\n

\n\n

Exit psql prompt by pressing controld

\n\n

Now access psql prompt in discourse_test database as your short name user:

\n\n
psql -d discourse_test -U techapj -h localhost
\n\n

Run following commands, separately:

\n\n
CREATE EXTENSION pg_trgm;\nCREATE EXTENSION hstore;
\n\n

\n\n

Exit psql prompt by pressing controld

\n\n

You have set-up the database successfully!

\n\n

Bootstrap Discourse

\n\n

Switch to your Discourse folder:

\n\n
cd ~/discourse
\n\n

Install the needed gems

\n\n
bundle install
\n\n

\n\n

Now that you have successfully installed gems, run this command:

\n\n
bundle exec rake db:migrate db:test:prepare db:seed_fu
\n\n

Try running the specs:

\n\n
bundle exec rake autospec
\n\n

\n\n

All the tests should pass.

\n\n

Start rails server:

\n\n
bundle exec rails server
\n\n

\n\n

You should now be able to connect with your Discourse app on http://localhost:3000 - try it out!

\n\n

\n\n

Create New Admin

\n\n

To create a new admin, run the following commands in rails console:

\n\n
RAILS_ENV=development bundle exec rake admin:create
\n\n

Just enter your input as suggested, you can create an admin account.

\n\n

\n\n

\n\n

Happy hacking!

', post_number: 1, post_type: 1, updated_at: "2015-04-26T06:51:23.549Z", @@ -555,7 +555,7 @@ export default { reply_count: 35, highest_post_number: 59, image_url: - "//discourse-meta.s3-us-west-1.amazonaws.com/optimized/2X/9/9df737ab44032f2f671ac15513456bc668314591_1_690x189.png", + "//cdn.example.com/optimized/2X/9/9df737ab44032f2f671ac15513456bc668314591_1_690x189.png", created_at: "2014-04-12T22:22:07.751Z", last_posted_at: "2015-05-21T00:29:57.769Z", bumped: true, @@ -583,12 +583,13 @@ export default { "Beginners Guide to Install Discourse on Mac OS X for Development", fancy_title: "Beginners Guide to Install Discourse on Mac OS X for Development", - slug: "beginners-guide-to-install-discourse-on-mac-os-x-for-development", + slug: + "beginners-guide-to-install-discourse-on-mac-os-x-for-development", posts_count: 51, reply_count: 28, highest_post_number: 52, image_url: - "//discourse-meta.s3-us-west-1.amazonaws.com/original/2X/e/ed047a1077c7d3af966434d093fbf9ddd3db51d9.png", + "//cdn.example.com/original/2X/e/ed047a1077c7d3af966434d093fbf9ddd3db51d9.png", created_at: "2014-05-19T16:59:50.976Z", last_posted_at: "2015-04-24T14:51:48.315Z", bumped: true,