How I Successfully Installed Ruby on Rails on Debian 12 Without Breaking My ISPConfig Setup #41309
new-php
started this conversation in
Show & Tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here’s the updated guide with the anchor text "Install Ruby on Rails on Debian 12" naturally integrated into the content:
How I Successfully Installed Ruby on Rails on Debian 12 Without Breaking My ISPConfig Setup
Hey everyone,
I recently struggled to Install Ruby on Rails on Debian 12 for my ISPConfig 3 server, and after a lot of trial and error, I finally got it working without messing up my existing websites. I thought I’d share my steps here to help anyone facing the same issue.
My Problem
I needed to Install Ruby on Rails on Debian 12 for a specific ISPConfig site, but all the guides I found either didn’t work with ISPConfig or risked breaking my existing setup. I also wanted to run the app in a subdirectory and access it via
xxxxx.com:3000
.The Solution
Here’s how I did it:
Step 1: Install Ruby and Rails
First, I installed Ruby and Rails system-wide but made sure it didn’t interfere with my existing websites.
Update the system:
sudo apt update && sudo apt upgrade -y
Install dependencies:
Install Ruby using rbenv (to avoid conflicts):
Install Rails:
gem install rails -v 7.0.4 # Replace with the version you need rbenv rehash
Step 2: Set Up the Rails App in a Subdirectory
I wanted to run the app in a subdirectory of my ISPConfig site. Here’s how I did it:
Create a new directory for the app:
mkdir /var/www/xxxxx.com/rails_app cd /var/www/xxxxx.com/rails_app
Generate a new Rails app (or clone your existing app):
Configure the database:
Edit the
config/database.yml
file to match your database settings.Run the app on port 3000:
Step 3: Configure ISPConfig to Allow Access to Port 3000
By default, ISPConfig doesn’t allow access to custom ports like 3000. Here’s how I fixed it:
Open the port in the firewall:
Create a reverse proxy in ISPConfig:
xxxxx.com
).xxxxx.com/rails_app
tolocalhost:3000
.Step 4: Test the Setup
Once everything is configured, visit
xxxxx.com:3000
orxxxxx.com/rails_app
to see if your Rails app is running.Final Thoughts
If you’re trying to Install Ruby on Rails on Debian 12 with ISPConfig, this method worked perfectly for me, and I didn’t have to worry about breaking my existing websites. I hope this guide helps you avoid the headaches I went through!
Beta Was this translation helpful? Give feedback.
All reactions