Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ FileUtils.chdir APP_ROOT do
puts "\n== Preparing database =="
system! "bin/rails db:prepare"

puts "\n== Generating React on Rails locales =="
system! "bin/rails react_on_rails:locale"

puts "\n== Removing old logs and tempfiles =="
system! "bin/rails log:clear tmp:clear"

Expand Down
30 changes: 30 additions & 0 deletions conductor-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
set -e

echo "🚀 Setting up React on Rails workspace..."

# Note: This project requires Ruby 3.3.4.
# Please ensure you have the correct Ruby version active before running this script.

# Copy environment files if they exist in the root
if [ -f "$CONDUCTOR_ROOT_PATH/.env" ]; then
cp "$CONDUCTOR_ROOT_PATH/.env" .env
echo "✅ Copied .env file from root"
elif [ -f "$CONDUCTOR_ROOT_PATH/.env.example" ]; then
cp "$CONDUCTOR_ROOT_PATH/.env.example" .env
echo "✅ Copied .env.example to .env"
fi

if [ -f "$CONDUCTOR_ROOT_PATH/config/database.yml" ]; then
cp "$CONDUCTOR_ROOT_PATH/config/database.yml" config/database.yml
echo "✅ Copied database.yml from root"
elif [ -f "config/database.yml.example" ]; then
cp config/database.yml.example config/database.yml
echo "✅ Copied database.yml.example to database.yml"
fi

# Run the standard Rails setup script
echo "🔧 Running Rails setup script..."
bin/setup --skip-server

echo "✨ Setup complete! You can now run the development server."
8 changes: 8 additions & 0 deletions conductor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"scripts": {
"setup": "./conductor-setup.sh",
"run": "bin/dev",
"archive": ""
},
"runScriptMode": "nonconcurrent"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.1.0",
"description": "Code from the React Webpack tutorial.",
"engines": {
"node": "22",
"node": ">=22",
"yarn": "1.22"
},
"repository": {
Expand Down