Even with detailed installation instructions, problems may still arise while installing or starting Ghost. We will look at some of the common errors that occur.
If you come across this error when trying to start Ghost, this means that the port on which you are trying to start Ghost is already in use. This error usually occurs when trying to start Ghost, but another website or application is already running on this port. Usually this happens when someone tries to start Ghost but it is already running. In this instance, you will either need to stop the application or start Ghost on a different port. If you choose to start Ghost on a different port, this change should be made in the config.js
file.
When starting Ghost, if you see this error, it means that something is wrong in the host:
or port:
section of your config.js
file. Usually this is caused by a syntax error, or by entering an address or port that does not exist. Here is the syntax that should be used in the config.js
file:
host: '127.0.0.1', port: '2368'
For reference, you can see a sample config.js
file in the .zip
file that came with this book.
This error typically happens when you try to use sudo
. This error can happen when you use the npm
or forever
commands. The reason you get this error is because the sudo
user issuing the command does not know the location of the application. In order to get the commands to work, you need to use the full file path to the application. The commands should look something like this:
sudo /usr/local/bin/npm start index.js
The preceding command uses the full filepath to npm
, unlike sudo npm start index.js
.
If you have any trouble installing and running Ghost, there are many resources that can help. The first, and most popular place, is the official Ghost forum at (https://ghost.org/forum/). The Ghost forum has a great community and people are always willing to help.
Ghost also has an official IRC channel (irc.freenode.net
, #Ghost
) with quite a few regular users. The IRC is a good place if you are looking for immediate answers to a problem.
Two of this book's authors, Andy and David also run a few websites: Ghost For Beginners (http://ghostforbeginners.com), All About Ghost (http://allaboutghost.com), and How to Install Ghost (http://howtoinstallghost.com). We feel they are also a great resource if you are looking for more detailed install instructions or articles relating to other Ghost features. If you have any questions, feel free to comment on either site and we will answer as best as we can.
3.16.79.146