A simple Ruby on Rails application where users can share book recommendations and comment on them. Includes light/dark mode toggle and is deployed online.
- Add books with title, author, and description
- Comment on each book
- Light/Dark mode toggle (with localStorage)
- TailwindCSS for modern UI
- PostgreSQL as the database
- Deployed to Render
- Ruby on Rails 8
- Tailwind CSS
- PostgreSQL
- Render (for hosting)
git clone https://github.com/sham1ko/rails-book-app.git
cd rails-book-app
bundle install
yarn install # if using jsbundling-rails
rails db:create db:migrate db:seed
bin/dev
Or:
rails server
When deploying to Render, make sure to set the following environment variables in your service settings:
DATABASE_URL=postgresql://your_user:your_password@your-host:5432/your_db
RAILS_MASTER_KEY=your_master_key_from_config/master.key
WEB_CONCURRENCY=2
- Set
DATABASE_URL
andRAILS_MASTER_KEY
in Render environment
Build command:
bundle install; bundle exec rake assets:precompile; bundle exec rake assets:clean;```
Start command:
bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}```