Skip to content

Commit a4c87fb

Browse files
committed
Use latest Ruby and dependencies, add local dev setup script
1 parent 1beb6d7 commit a4c87fb

File tree

3 files changed

+67
-4
lines changed

3 files changed

+67
-4
lines changed

.github/workflows/jekyll-gh-pages.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@ jobs:
2828
- name: Setup Ruby
2929
uses: ruby/setup-ruby@v1
3030
with:
31-
ruby-version: '2.6'
32-
bundler-cache: true
31+
ruby-version: '3.3'
32+
bundler-cache: false
3333
working-directory: www
3434

3535
- name: Build with Jekyll
3636
run: |
3737
cd www
38+
gem update --system
39+
gem install bundler
40+
bundle update --bundler
3841
bundle install
3942
bundle exec jekyll build
4043
env:

setup-local-dev.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
3+
# Script to set up local development environment for the website
4+
5+
# Colors for output
6+
GREEN='\033[0;32m'
7+
YELLOW='\033[1;33m'
8+
RED='\033[0;31m'
9+
NC='\033[0m' # No Color
10+
11+
echo -e "${YELLOW}Setting up local development environment...${NC}"
12+
13+
# Add Homebrew Ruby to PATH
14+
echo -e "${YELLOW}Adding Homebrew Ruby to PATH...${NC}"
15+
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
16+
17+
# Check Ruby version
18+
echo -e "${YELLOW}Checking Ruby version...${NC}"
19+
ruby_version=$(ruby -v)
20+
echo -e "Ruby version: ${GREEN}$ruby_version${NC}"
21+
22+
# Check if Ruby is from Homebrew
23+
which_ruby=$(which ruby)
24+
if [[ $which_ruby == *"/opt/homebrew/opt/ruby/bin/ruby"* ]]; then
25+
echo -e "${GREEN}Using Homebrew Ruby: $which_ruby${NC}"
26+
else
27+
echo -e "${RED}Not using Homebrew Ruby. Current Ruby: $which_ruby${NC}"
28+
echo -e "${YELLOW}Please make sure Homebrew Ruby is installed:${NC}"
29+
echo -e " brew install ruby"
30+
echo -e "${YELLOW}Then add the following to your shell profile (.zshrc, .bash_profile, etc.):${NC}"
31+
echo -e " export PATH=\"/opt/homebrew/opt/ruby/bin:\$PATH\""
32+
exit 1
33+
fi
34+
35+
# Update RubyGems
36+
echo -e "${YELLOW}Updating RubyGems...${NC}"
37+
gem update --system
38+
39+
# Install Bundler
40+
echo -e "${YELLOW}Installing latest Bundler...${NC}"
41+
gem install bundler
42+
43+
# Install dependencies
44+
echo -e "${YELLOW}Installing dependencies...${NC}"
45+
cd www
46+
bundle update --bundler
47+
bundle install
48+
49+
echo -e "\n${GREEN}Setup complete!${NC}"
50+
echo -e "${YELLOW}To run the site locally:${NC}"
51+
echo -e " cd www"
52+
echo -e " bundle exec jekyll serve"
53+
54+
echo -e "\n${YELLOW}To make this setup permanent, add the following to your shell profile (.zshrc, .bash_profile, etc.):${NC}"
55+
echo -e " export PATH=\"/opt/homebrew/opt/ruby/bin:\$PATH\""
56+
57+
echo -e "\n${GREEN}Done!${NC}"

www/Gemfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ gem "github-pages", group: :jekyll_plugins
77
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
88
# and associated library.
99
platforms :mingw, :x64_mingw, :mswin, :jruby do
10-
gem "tzinfo", "~> 1.2"
10+
gem "tzinfo", "~> 2.0"
1111
gem "tzinfo-data"
1212
end
1313

@@ -19,4 +19,7 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
1919
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
2020

2121
# Needed for Ruby 3.0+
22-
gem "webrick", "~> 1.7"
22+
gem "webrick", "~> 1.8"
23+
24+
# Explicitly specify ffi version to avoid compatibility issues
25+
gem "ffi", ">= 1.15.5"

0 commit comments

Comments
 (0)