Quickstart
Last updated
Last updated
After accepting the Github Invite, Follow these steps to quickly set up your new Ruby on Rails application using the Lightning Rails boilerplate.
If you doubt you have the correct Ruby on Rails Setup, you can refer to , one of the most complete.
First, clone the Lightning Rails repository to your local machine. Open your terminal and run:
If you are getting ERROR: Repository not found. fatal: Could not read from remote repository.
Make sure that you have accepted the Github Invitation on your email. Or that the github account in your terminal is the same you signed up with.
This creates a clone of the lightning rails repo, which is great! But we only want the source code, not the GitHub origin or all your code would be pushed to the Source repo 🫣
Let's fix it by removing the Origin and creating a new one...
After cloning the repository, navigate to the project directory:
First, let's remove the source code remote in your terminal:
Then we will create a new repository in our GitHub account and assign the current directory as source.
🚨 Very important to add --private
flag when creating the GitHub repo for your project (Your license could be revoked if lightning-rails source code is leaked through a public repository).
Commit and push your first commit
Et Voila! You officially have Lightning rails boilerplate on your own GitHub account. Now let's continue with the setup.
Next, install the necessary dependencies. Run the following command:
Let's start with a fresh database
Finally, run the migrations to set up your database schema:
You should see a few migrations for User Authentication and Stripe payments management.
The latest versions of Rails encrypt credentials directly in your code. When you clone this project, the original encrypted credentials file is also cloned. However, because it was created on LightningRails' computer, you won't be able to access it. To fix this, delete the cloned credentials file and let Rails automatically generate a new one by running the following command:
We will need to save our secret API keys locally on our computer. For this, we will use the dot-env gem already installed in the boilerplate and ignored in .gitignore
. We only need to copy and rename the .env sample file.
Check it out with VS code (Or any other text editor)! You can adapt the values by opening it with:
Now you are ready to start your development server: