This is a pretty common setup scenario for a new Beach Platform Instance, that may include a couple of different custom engines, and the issues you may encounter along the way.
- Create Parent Rails Application
- Install Beach Core Engine
1. Create Parent Rails Application
The Beach Platform architecture requires a fairly lightweight parent Rails application.
Avoiding a deep dive into what makes up this application (I'll reserve that for a future Topic), you can use this Starter Project
Beach Platform Starter Project - Github
You will need to find & replace the
NewApp part of the application name, renaming files, directories and code to your app name.
// TODO: A generator or rake task to automate this!!!
To complete initial setup, run...
bundle exec rails db:setup
2. Install Beach Core Engine
Although the above starter project includes the Beach Core engine's gem as a dependency, we need to complete the initialisation of it.
Add this line to your application's Gemfile:
Now if you run the rails server, you should be able access your local dev environment.
http://localhost:3000 - this will show the API Docs
http://localhost:3000/admin - this will give you access to the admin login screen