0

Ok so I'm trying to make a server for RPG Maker XP using MySQL, Ruby, and HeidiSQL. I'm following this setup guide and I've run into an issue where my Ruby crashes as it opens. I've screenshotted every step I've taken past the installations of the applications.

Step 1 Guide

Step 1

Step 2 Guide

Step 2

Step 2 Warning

Step 3 Guide

Step 3 (The Password is covered)

Step 4 Guide

So after adding the password in the Main.rb Notepad (Step 3, Password Covered), I follow the steps to running the Main.rb server in Ruby. Just as Ruby opens, it closes. I can't seem to figure out why it doesn't run, it also closes and gives no error message so I'm completely lost. I've been told that it's possible that my PC just isn't good enough to host a server, if that's a possibility and it would help I can attach my PC specs in the comments? also if you need to see the code/script of the server I can also attach that in comments (or thread, I'm new to this so I'm not entirely sure how this whole site works).

Any Suggestions are appreciated, I apologize if this is rather confusing I wasn't exactly sure how to explain or show my issue.

Error:

C:\Users\Whyte\Documents\Clockwork Stuff\beta 2\server>ruby main.rb
Traceback (most recent call last):
        2: from main.rb:6:in `<main>'
        1: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- ./bin/2.7/mysql_api (LoadError)

This is the code for the PEO database.sql file

-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               5.6.13-log - MySQL Community Server (GPL)
-- Server OS:                    Win64
-- HeidiSQL Version:             8.0.0.4484
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

-- Dumping database structure for peo
DROP DATABASE IF EXISTS `peo`;
CREATE DATABASE IF NOT EXISTS `peo` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
USE `peo`;


-- Dumping structure for table peo.buddy_list
DROP TABLE IF EXISTS `buddy_list`;
CREATE TABLE IF NOT EXISTS `buddy_list` (
  `user1_id` int(10) unsigned NOT NULL,
  `user2_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`user1_id`,`user2_id`),
  KEY `user2_id` (`user2_id`),
  CONSTRAINT `buddy_list_ibfk_1` FOREIGN KEY (`user1_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  CONSTRAINT `buddy_list_ibfk_2` FOREIGN KEY (`user2_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dumping data for table peo.buddy_list: ~0 rows (approximately)
DELETE FROM `buddy_list`;
/*!40000 ALTER TABLE `buddy_list` DISABLE KEYS */;
/*!40000 ALTER TABLE `buddy_list` ENABLE KEYS */;


-- Dumping structure for table peo.inbox
DROP TABLE IF EXISTS `inbox`;
CREATE TABLE IF NOT EXISTS `inbox` (
  `pm_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `recipient_id` int(10) unsigned NOT NULL,
  `sendername` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `senddate` datetime NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `unread` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`pm_id`),
  KEY `recipient_id` (`recipient_id`),
  CONSTRAINT `inbox_ibfk_1` FOREIGN KEY (`recipient_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dumping data for table peo.inbox: ~0 rows (approximately)
DELETE FROM `inbox`;
/*!40000 ALTER TABLE `inbox` DISABLE KEYS */;
/*!40000 ALTER TABLE `inbox` ENABLE KEYS */;


-- Dumping structure for table peo.ips
DROP TABLE IF EXISTS `ips`;
CREATE TABLE IF NOT EXISTS `ips` (
  `user_id` int(10) unsigned NOT NULL,
  `ip` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`user_id`,`ip`),
  CONSTRAINT `ips_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dumping data for table peo.ips: ~0 rows (approximately)
DELETE FROM `ips`;
/*!40000 ALTER TABLE `ips` DISABLE KEYS */;
/*!40000 ALTER TABLE `ips` ENABLE KEYS */;


-- Dumping structure for table peo.users
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
  `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `usergroup` int(10) NOT NULL DEFAULT '0',
  `banned` tinyint(1) NOT NULL DEFAULT '0',
  `uniquecode` char(8) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dumping data for table peo.users: ~0 rows (approximately)
DELETE FROM `users`;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
/*!40000 ALTER TABLE `users` ENABLE KEYS */;


-- Dumping structure for table peo.user_data
DROP TABLE IF EXISTS `user_data`;
CREATE TABLE IF NOT EXISTS `user_data` (
  `user_id` int(10) unsigned NOT NULL,
  `lastlogin` datetime NOT NULL,
  `guild_id` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`user_id`),
  KEY `guild_id` (`guild_id`),
  CONSTRAINT `user_data_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  CONSTRAINT `user_data_ibfk_2` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`guild_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dumping data for table peo.user_data: ~0 rows (approximately)
DELETE FROM `user_data`;
/*!40000 ALTER TABLE `user_data` DISABLE KEYS */;
/*!40000 ALTER TABLE `user_data` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

This is the code after attempting to run the PEO database.sql file, btw I'm running it in heidisql

/* Delimiter changed to ; */
/* Connecting to 127.0.0.1 via MariaDB or MySQL (TCP/IP), username root, using password: Yes ... */
SELECT CONNECTION_ID();
/* Characterset: utf8mb4 */
SHOW /*!50002 GLOBAL */ STATUS;
SELECT NOW();
SHOW VARIABLES;
/* Connected. Thread-ID: 8 */
SHOW TABLES FROM `information_schema`;
SHOW DATABASES;
/* Entering session "Unnamed" */
/* Loading file "C:\Users\Whyte\Documents\Clockwork Stuff\beta 2\server\database\PEO database.sql" (4.6 KiB) into query tab #1 ... */
-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               5.6.13-log - MySQL Community Server (GPL)
-- Server OS:                    Win64
-- HeidiSQL Version:             8.0.0.4484
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping database structure for peo
DROP DATABASE IF EXISTS `peo`;
CREATE DATABASE IF NOT EXISTS `peo` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
USE `peo`;
-- Dumping structure for table peo.buddy_list
DROP TABLE IF EXISTS `buddy_list`;
CREATE TABLE IF NOT EXISTS `buddy_list` (
  `user1_id` int(10) unsigned NOT NULL,
  `user2_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`user1_id`,`user2_id`),
  KEY `user2_id` (`user2_id`),
  CONSTRAINT `buddy_list_ibfk_1` FOREIGN KEY (`user1_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  CONSTRAINT `buddy_list_ibfk_2` FOREIGN KEY (`user2_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- Dumping data for table peo.buddy_list: ~0 rows (approximately)
DELETE FROM `buddy_list`;
/*!40000 ALTER TABLE `buddy_list` DISABLE KEYS */;
/*!40000 ALTER TABLE `buddy_list` ENABLE KEYS */;
-- Dumping structure for table peo.inbox
DROP TABLE IF EXISTS `inbox`;
CREATE TABLE IF NOT EXISTS `inbox` (
  `pm_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `recipient_id` int(10) unsigned NOT NULL,
  `sendername` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `senddate` datetime NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `unread` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`pm_id`),
  KEY `recipient_id` (`recipient_id`),
  CONSTRAINT `inbox_ibfk_1` FOREIGN KEY (`recipient_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- Dumping data for table peo.inbox: ~0 rows (approximately)
DELETE FROM `inbox`;
/*!40000 ALTER TABLE `inbox` DISABLE KEYS */;
/*!40000 ALTER TABLE `inbox` ENABLE KEYS */;
-- Dumping structure for table peo.ips
DROP TABLE IF EXISTS `ips`;
CREATE TABLE IF NOT EXISTS `ips` (
  `user_id` int(10) unsigned NOT NULL,
  `ip` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`user_id`,`ip`),
  CONSTRAINT `ips_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- Dumping data for table peo.ips: ~0 rows (approximately)
DELETE FROM `ips`;
/*!40000 ALTER TABLE `ips` DISABLE KEYS */;
/*!40000 ALTER TABLE `ips` ENABLE KEYS */;
-- Dumping structure for table peo.users
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
  `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `usergroup` int(10) NOT NULL DEFAULT '0',
  `banned` tinyint(1) NOT NULL DEFAULT '0',
  `uniquecode` char(8) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- Dumping data for table peo.users: ~0 rows (approximately)
DELETE FROM `users`;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
-- Dumping structure for table peo.user_data
DROP TABLE IF EXISTS `user_data`;
CREATE TABLE IF NOT EXISTS `user_data` (
  `user_id` int(10) unsigned NOT NULL,
  `lastlogin` datetime NOT NULL,
  `guild_id` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`user_id`),
  KEY `guild_id` (`guild_id`),
  CONSTRAINT `user_data_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
  CONSTRAINT `user_data_ibfk_2` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`guild_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- Dumping data for table peo.user_data: ~0 rows (approximately)
DELETE FROM `user_data`;
/*!40000 ALTER TABLE `user_data` DISABLE KEYS */;
/*!40000 ALTER TABLE `user_data` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/* Affected rows: 6  Found rows: 0  Warnings: 47  Duration for 35 queries: 15.576 sec. */
SHOW WARNINGS LIMIT 5;
whyte
  • 1
  • 1
  • In this image: https://i.stack.imgur.com/plPyE.jpg put your cursor in the path box that says `This PC > Documents > Clockwork Stuff > ...`. Then DELETE all text in that box with your backspace key. Then in the empty space type `cmd.exe` and hit ENTER. This should open a black dos prompt window in your `server` folder. Into this window type `ruby main.rb` and hit ENTER. Now you should be able to see what it outputs. Copy and paste any errors here, and let's see what you have. – Casper Apr 06 '21 at 23:38
  • file:///C:/Users/Whyte/Pictures/Question/Capture%2013.JPG This is what appears. Do you have discord? It'll be easier for us to communicate through there. – whyte Apr 07 '21 at 22:27
  • thanks for the help, I'll be sure to do these things moving forward. – whyte Apr 08 '21 at 00:53
  • You can try running this in the terminal `gem install mysql2`. This will install MySQL support for your Ruby version. Then run `ruby main.rb` again and see what happens. – Casper Apr 08 '21 at 01:22
  • It is rather late for me at the moment and I have to be up in the morning, I'll be sure to update you on everything and carry on with this once I can tomorrow. Sorry for the inconvenience. – whyte Apr 08 '21 at 04:31
  • I've added the code to the post I hope that helps – whyte Apr 08 '21 at 21:20

0 Answers0