https://github.com/unique-thinker/q-and-a-
https://github.com/unique-thinker/q-and-a-
rails ruby ruby-on-rails
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/unique-thinker/q-and-a-
- Owner: unique-thinker
- Created: 2022-08-10T22:48:49.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-10T23:46:03.000Z (almost 4 years ago)
- Last Synced: 2025-03-27T22:20:28.634Z (over 1 year ago)
- Topics: rails, ruby, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Installation
**Requirements:**
- **postgresql**
- **Ruby** 3.1.2
- **Rails** 7.0.3.1
##### 1. Clone the repository
```bash
git clone repository_url
```
##### 3. Run below command to generate credentials.yml.enc for development amd test enviroment
```bash
EDITOR="vim" rails credentials:edit --environment development
```
```bash
EDITOR="vim" rails credentials:edit --environment test
```
Paste the original credentials you copied from config/credentials/credentials.example.yml file in the new credentials file (and save + quit)
##### 4. Run bundler
```bash
bundle
```
##### 5. Create and setup the database
Run the following commands to create and setup the database.
```ruby
bundle exec rails db:create
bundle exec rails db:migrate
bundle exec rails db:seed
```
##### 6. Start the Rails server
You can start the rails server using the command given below.
```ruby
bundle exec rails s -p 3011
```
#### Production only
##### 4. Run bundler
```bash
bundle install --without development test
```
##### 5. Create and setup the database
Run the following commands to create and setup the database.
```ruby
RAILS_ENV=production bundle exec rails db:create
RAILS_ENV=production bundle exec rails db:migrate
RAILS_ENV=production bundle exec rails db:seed
```
##### 6. Start the Rails server
You can start the rails server using the command given below.
```ruby
RAILS_ENV=production bundle exec rails s
```