diff --git a/README.md b/README.md index 6ac596e..524667f 100644 --- a/README.md +++ b/README.md @@ -13,23 +13,97 @@ Head to this website to know more about jekyll https://jekyllrb.com/docs/ ### Installing +First, install Homebrew if you don't already have it: +```bash +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` + +Install rbenv and ruby-build: +```bash +brew install rbenv ruby-build +``` + +Add rbenv to your shell: +```bash +echo 'eval "$(rbenv init - zsh)"' >> ~/.zshrc +# Or for bash +# echo 'eval "$(rbenv init - bash)"' >> ~/.bashrc +``` + +Restart your terminal or source your profile: +```bash +source ~/.zshrc # or ~/.bashrc +``` + +Install the latest stable Ruby version: +```bash +rbenv install 3.2.2 # or any newer version +``` + +Set it as your global Ruby version: +```bash +rbenv global 3.2.2 +``` + +Verify the installation: +```bash +ruby -v +``` + +Install bundler: +```bash +gem install bundler +``` + +Navigate back to your project and try running bundler again: +```bash bundle install +bundle exec jekyll serve --livereload ``` ### Executing program +After installation, you can run the Jekyll site locally: -* How to run the program - -* with live reload +* With live reload (automatically refreshes the browser when files change): ``` bundle exec jekyll serve --livereload ``` -* without live reload +* Without live reload: ``` bundle exec jekyll serve ``` +Once the server is running, you can view the site by opening a browser and navigating to: +``` +http://localhost:4000 +``` +### Troubleshooting + +If you encounter any issues during installation or execution: + +1. Make sure Ruby is installed and up to date: +``` +ruby -v +``` + +2. If you encounter permission errors with Homebrew: +``` +sudo chown -R $(whoami) /usr/local/Homebrew +``` + +3. If bundle install fails with dependency issues: +``` +bundle update +bundle install +``` + +4. If you see "command not found: jekyll", ensure Jekyll is properly installed: +```bash +gem install jekyll +gem install bundler +``` + +For more information, refer to the [Jekyll documentation](https://jekyllrb.com/docs/).