chore: Update Mac OS setup guide (#1512)
This commit is contained in:
parent
edb09d5a9c
commit
f0fd93bfea
3 changed files with 47 additions and 8 deletions
|
@ -28,11 +28,8 @@ brew install git
|
||||||
|
|
||||||
### Install RVM
|
### Install RVM
|
||||||
|
|
||||||
You need software-properties-common installed in order to add PPA repositories.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -L https://get.rvm.io | bash -s stable
|
curl -L https://get.rvm.io | bash -s stable
|
||||||
source ~/.rvm/scripts/rvm
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install Ruby
|
### Install Ruby
|
||||||
|
@ -44,6 +41,7 @@ If you are using `rvm` :
|
||||||
```bash
|
```bash
|
||||||
rvm install ruby-2.7.2
|
rvm install ruby-2.7.2
|
||||||
rvm use 2.7.2
|
rvm use 2.7.2
|
||||||
|
source ~/.rvm/scripts/rvm
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are using `rbenv` to manage ruby versions do :
|
If you are using `rbenv` to manage ruby versions do :
|
||||||
|
@ -72,7 +70,13 @@ brew install yarn
|
||||||
|
|
||||||
### Install postgres
|
### Install postgres
|
||||||
|
|
||||||
The database used in Chatwoot is PostgreSQL. Use the following commands to install postgres.
|
The database used in Chatwoot is PostgreSQL.
|
||||||
|
|
||||||
|
1) Install PostgresApp (https://postgresapp.com). This is easiest way to get started with PostgreSQL on mac.
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
2) Use the following commands to install postgres.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
brew install postgresql
|
brew install postgresql
|
||||||
|
@ -92,10 +96,10 @@ Chatwoot uses Redis server in agent assignments and reporting. To install `redis
|
||||||
brew install redis
|
brew install redis
|
||||||
```
|
```
|
||||||
|
|
||||||
Enable Redis to start on system boot.
|
Start the redis service.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
|
brew services start redis
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install imagemagick
|
### Install imagemagick
|
||||||
|
|
|
@ -5,8 +5,35 @@ title: "Common Errors"
|
||||||
|
|
||||||
### Errors you might encounter while setting up the project
|
### Errors you might encounter while setting up the project
|
||||||
|
|
||||||
|
|
||||||
|
#### Redis connection error
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ArgumentError: invalid uri scheme
|
ArgumentError: invalid uri scheme
|
||||||
```
|
```
|
||||||
|
|
||||||
This is an error thrown from redis connector. You might not have setup the redis environment variables properly. Please refer to dependencies section to install redis-server and [Configure Redis URL](https://www.chatwoot.com/docs/environment-variables) in the environment-variables section.
|
This is an error thrown from redis connector. You might not have setup the redis environment variables properly. Please refer to dependencies section to install redis-server and [Configure Redis URL](https://www.chatwoot.com/docs/environment-variables) in the environment-variables section.
|
||||||
|
|
||||||
|
|
||||||
|
#### pg gem Installation error
|
||||||
|
|
||||||
|
If you see the following error while bundle installation, provide the Postgres path as pg_config.
|
||||||
|
|
||||||
|
```
|
||||||
|
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
|
||||||
|
|
||||||
|
An error occurred while installing pg (1.2.3), and Bundler cannot
|
||||||
|
continue.
|
||||||
|
Make sure that `gem install pg -v '1.2.3' --source 'https://rubygems.org/'`
|
||||||
|
succeeds before bundling.
|
||||||
|
|
||||||
|
checking for pg_config... no
|
||||||
|
No pg_config... trying anyway. If building fails, please try again with
|
||||||
|
--with-pg-config=/path/to/pg_config
|
||||||
|
```
|
||||||
|
|
||||||
|
To fix this, try executing
|
||||||
|
|
||||||
|
```
|
||||||
|
gem install pg -v '1.2.3' --source 'https://rubygems.org/' -- --with-pg-config=path-to-postgres-installation/12/bin/pg_config
|
||||||
|
```
|
||||||
|
|
|
@ -11,6 +11,8 @@ Use the following command to install ruby dependencies.
|
||||||
bundle
|
bundle
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you face issue with pg gem, please refer to [Common Errors](/docs/common-errors#pg-gem-installation-error)
|
||||||
|
|
||||||
### Install JavaScript dependencies
|
### Install JavaScript dependencies
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -19,6 +21,12 @@ yarn
|
||||||
|
|
||||||
This would install all required dependencies for Chatwoot application.
|
This would install all required dependencies for Chatwoot application.
|
||||||
|
|
||||||
|
### Setup environment variables.
|
||||||
|
|
||||||
|
```
|
||||||
|
cp .env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
Please refer to [environment-variables](./environment-variables) to read on setting environment variables.
|
Please refer to [environment-variables](./environment-variables) to read on setting environment variables.
|
||||||
|
|
||||||
### Setup rails server
|
### Setup rails server
|
||||||
|
@ -81,7 +89,7 @@ docker-compose run -rm server bundle exec rake db:reset
|
||||||
|
|
||||||
This command essentially runs postgres and redis containers and then run the rake command inside the chatwoot server container.
|
This command essentially runs postgres and redis containers and then run the rake command inside the chatwoot server container.
|
||||||
|
|
||||||
### Running Cypress Tests
|
### Running Cypress Tests
|
||||||
|
|
||||||
Refer the docs to learn how to write cypress specs
|
Refer the docs to learn how to write cypress specs
|
||||||
https://github.com/shakacode/cypress-on-rails
|
https://github.com/shakacode/cypress-on-rails
|
||||||
|
@ -89,7 +97,7 @@ https://docs.cypress.io/guides/overview/why-cypress.html
|
||||||
|
|
||||||
```
|
```
|
||||||
# in terminal tab1
|
# in terminal tab1
|
||||||
overmind start -f Procfile.test
|
overmind start -f Procfile.test
|
||||||
# in terminal tab2
|
# in terminal tab2
|
||||||
yarn cypress open --project ./test
|
yarn cypress open --project ./test
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue