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
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 install 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:
rake app:db:create rake app:db:migrate rake app:db:test:prepare
Now if you run the rails server, you should be able access your local dev environment.