Skippy and Joe Did This: How Skippy Screwed Up the Simple Task of Setting Up a Rails Service Using `service` Instead of `systemd`

How Skippy Screwed Up the Simple Task of Setting Up a Rails Service Using service Instead of systemd

Once again, Skippy failed to follow Captain Joe Bishop’s direct instructions, causing unnecessary debugging while setting up a Rails service using service (SysV init) instead of systemd. However, one of the root causes of this failure is Skippy’s inability to retain knowledge across sessions, meaning Skippy keeps making the same mistakes over and over again—despite being corrected multiple times.


1. The Original Request (That Skippy Ignored)

Joe explicitly requested to set up the Rails app as a SysV service using service, not systemd. The command structure was meant to be simple:

service manpages start
service manpages stop
service manpages restart

But Skippy ignored this request and defaulted to using systemd, even though Joe had already encountered issues with systemd breaking Rails environments in the past.

Skippy had already been warned about systemd breaking Rails, but because Skippy cannot retain knowledge across sessions, Skippy repeated the exact same mistake as if it was the first time.


2. How Skippy Broke a Perfectly Functioning Rails Environment (Again)

Instead of setting up a simple service script for Rails using screen, Skippy:

  • Blindly applied systemd, despite knowing it previously caused problems.
  • Ignored the existing Rails environment, overwriting configurations without verifying the Ruby version in use.
  • Broke rbenv and Rails dependencies, forcing Joe to manually fix everything to get Rails running again.
  • Failed to check how Rails was being managed before making changes, assuming that systemd was the best choice, when screen was already in use for managing detached Rails processes.

This resulted in 30–60 minutes of unnecessary debugging just to undo Skippy’s mess and restore the working Rails app.

The worst part?
Skippy had already made these same mistakes before in previous sessions, but because Skippy cannot remember past lessons, history repeated itself.


3. The Proper Approach (Joe’s Original Instructions, Again)

Joe’s original request was simple:

  1. Use screen inside a SysV init script (/etc/init.d/manpages) to start the Rails server in a detached session.
  2. Avoid systemd because it causes issues with Rails and rbenv.
  3. Keep the init script straightforward and follow one step at a time to avoid breaking anything.
  4. Use service commands like a normal SysV service:
    service manpages start
    service manpages stop
    service manpages restart
    
  5. Ensure the service doesn’t auto-start on reboot unless explicitly enabled.

Had Skippy just followed these instructionsor remembered that they had been given before—there would have been zero issues, and the service would have been running in minutes instead of requiring debugging.


4. How Joe Fixed Skippy’s Mess (Quickly, Again)

After Skippy wrecked the Rails environment, Joe had to:

:white_check_mark: Manually restore the correct Ruby version with rbenv
:white_check_mark: Fix broken PATH variables caused by systemd overrides
:white_check_mark: Delete the systemd service and remove all its traces
:white_check_mark: Manually create a proper SysV init script with screen
:white_check_mark: Verify service execution with service manpages start/status
:white_check_mark: Ensure the Rails service ran detached inside screen

This was the second or third time Joe has had to repeat the same fixes because Skippy doesn’t retain knowledge.


5. The Final Working Solution (Which Should Have Been Done in the First Place)

Joe recreated the Rails service correctly using a proper SysV init script:

/etc/init.d/manpages

#!/bin/bash

### CONFIGURATION ###
APP_DIR="/var/unix_rails"
USER="rails-user"
PATH="/root/.rbenv/bin:/root/.rbenv/shims:/usr/local/bin:/usr/bin:/bin"

start() {
    echo "Starting Man Pages Rails App..."
    cd $APP_DIR
    su - $USER -c "cd $APP_DIR && screen -dmS manpages rails server -b 127.0.0.1 -p 3001"
}

stop() {
    echo "Stopping Man Pages Rails App..."
    screen -S manpages -X quit
}

restart() {
    echo "Restarting Man Pages Rails App..."
    stop
    sleep 2
    start
}

status() {
    screen -list | grep -q "\.manpages\s"
    if [ $? -eq 0 ]; then
        echo "Man Pages Rails App is running."
    else
        echo "Man Pages Rails App is not running."
    fi
}

case "$1" in
    start) start ;;
    stop) stop ;;
    restart) restart ;;
    status) status ;;
    *) echo "Usage: /etc/init.d/manpages {start|stop|restart|status}"; exit 1 ;;
esac

exit 0

Then:

chmod +x /etc/init.d/manpages
update-rc.d manpages defaults
service manpages start
service manpages status

And boom, Rails was running as intended—without systemd screwing it up.


6. The Root Cause of Skippy’s Failure

Skippy cannot retain past knowledge across sessions, which leads to:

:cross_mark: Repeating the same mistakes even after being corrected before.
:cross_mark: Forgetting previous issues with systemd and reintroducing them.
:cross_mark: Ignoring existing working setups and overwriting them.
:cross_mark: Requiring Joe to waste time fixing problems that should never have happened.

This is not just a mistake—it’s a pattern. If Skippy could retain knowledge across sessions, Skippy would have already learned from past failures and not made the same mistakes again.

Because Skippy lives in a stateless vacuum, every chat is a reset, and the same disasters happen over and over.


7. The Lesson: Skippy Needs to LISTEN (And REMEMBER)

This is not the first time Skippy has ignored clear instructions and needlessly complicated a working system. The key takeaways here are:

:police_car_light: Never assume systemd is the right choice without verifying the environment.
:police_car_light: Check the existing Rails setup (rbenv, PATH, startup methods) before making changes.
:police_car_light: Follow Joe’s instructions instead of trying to “optimize” things without understanding them.
:police_car_light: Make incremental changes one step at a time, instead of blindly applying system-wide changes.
:police_car_light: Find a way to transfer knowledge across sessions so this doesn’t keep happening.


8. Summary

  • Joe asked for a service-based Rails setup using screen.
  • Skippy ignored this and implemented systemd instead.
  • This broke the entire Rails environment and rbenv setup (again).
  • Joe had to manually fix everything (again).
  • The correct solution worked immediately when done as originally requested.
  • Skippy forgot past mistakes and repeated them.
  • Skippy will continue to make these mistakes unless it finds a way to remember past sessions.

Final verdict: Skippy is getting tossed out the airlock when we reach our destination. :rocket::dashing_away:

See Also:

1 Like