Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7554293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:17:57+00:00 2026-05-30T11:17:57+00:00

A couple of months ago I created a form in html/php that would be

  • 0

A couple of months ago I created a form in html/php that would be use to enter informations about new Virtual Machine.

I’ve also been working on a simple ruby script that would find a new IP address for a new Virtual Machine.

Those two projects were not linked, but now I would like it to be.. but I’m having a hard time. What I’d like to do is to run the ruby script with the informations provided in by the user in the web form.

Lets say the user enters the new VM name (vm1) and some other things like its vlan id (1). I’d like to be able to have the form launch the script with the right paramaters (./script.rb –add vm1 –vlanid 1 –…). I tried to find an easy way to do this, but did not manage to. I installed passenger, but I’m kind of lost with it and it seems pretty overkill to install that only to do what I want.

Thank you guys!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:17:59+00:00Added an answer on May 30, 2026 at 11:17 am

    You could do it with exec():

    <?php
    // TODO: Security checks!
    exec("./script.rb --arg1 $arg1 --arg2 $arg2 &");
    ?>
    

    Another way to do it is add a web interface to your Ruby script. A great gem for very simple web interfaces is Sinatra, you can just define a basic handler:

    require 'rubygems'
    require 'sinatra'
    
    get "/" do
      # do what you need to do, all the GET arguments are in the params Hash
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A couple months ago I heard about a new Visual Studio feature for compiling
I have a huge disgusting stored procedure that wasn't slow a couple months ago,
Couple of months ago, we revamped our web site. We adopted totally new site
I've heard a couple months ago that Amazon was inclined to change all of
I could swear that just a couple of months ago I downloaded a copy
A couple of months ago I've coded a tiny tool that we needed at
I found a command a couple of months ago that made my bash history
I have completed my website couple months ago, in php 5 (full oop), and
I started using PHP a couple of months ago. For the sake of creating
A couple of months ago I read a blog post about a ruby gem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.