docbrown/docs/getting-started/start-app.md
Vaidehi Joshi 75dafe66da
Add note to help debug bin/setup issues. (#5651)
When starting the app for the first time, it's possible to run into some issues while trying to run `bin/setup`.
For example, when I started the app, I got an (unhelpful) error when running `bin/setup` and ended up figuring out the issue (needing to `yarn install`) by running the contents of the Procfile.dev file directly.

We should help point folks to this file so that they can run a command that gives them a more helpful error message, which should hopefully let them get the app up and running with any problems! :)
2020-01-22 14:37:08 -08:00

43 lines
1.4 KiB
Markdown

---
title: Starting the Application
---
# Starting the application
We're a Rails app, and we use [Webpacker][webpacker] to manage some of our
JavaScript.
Start the application, Webpack, and our job runner [delayed_job][delayed_job] by
running:
```shell
bin/startup
```
(This just runs `foreman start -f Procfile.dev`)
Then point your browser to http://localhost:3000/ to view the site.
If you run into issues while trying to run `bin/setup` and the error message
isn't helpful, try running `bin/rails s -p 3000`. For example, you may need to
`yarn install` before starting the app.
If you're working on DEV regularly, you can use `alias start="bin/startup"` to
make this even easier. 😊
If you're using **`pry`** for debugging in Rails, note that using `foreman` and
`pry` together works, but it's not as clean as `bin/rails server`.
Here are some singleton commands you may need, usually in a separate
instance/tab of your shell.
- Running the job server (if using `bin/rails server`) -- this is mostly for
notifications and emails: **`bin/rails jobs:work`**
- Clearing jobs (in case you don't want to wait for the backlog of jobs):
**`bin/rails jobs:clear`**
Current gotchas: potential environment issues with external services need to be
worked out.
[delayed_job]: https://github.com/collectiveidea/delayed_job_active_record
[webpacker]: https://github.com/rails/webpacker