How to use a Ruby application on cPanel hosting

Procédure

How to use the Ruby application manager on cPanel hosting

cPanel's Ruby Application Manager allows you to install Ruby applications from version 1.8 up to version 2.6.
It offers a user-friendly interface that will help you get to grips with Ruby more quickly.

How to access the Ruby Application Manager

To access the Ruby Application Manager, you must first log in to your cPanel account.

Then click on the Setup Ruby App icon:

How to use a Ruby application on cPanel hosting

The following window will appear, allowing you to enter information about the new application you wish to create:

How to use a Ruby application on cPanel hosting

1- Ruby version: This option allows you to select a specific Ruby version for your application:

2- App Directory: physical path to your application's files on the server. If you enter "my_app", your application's folder will be available in /home/cpxxxxx/my_app.

3- App Domain/URI: from which link the application can be accessed from the web. For example, if you want the application to respond via the http://mon-domaine-lws.fr/mon_app link, enter "my_app" in this field.

Once you have finished entering the parameters, click on the Setup button to access the application's URL, which will take you to the script created by default, indicating the Ruby version you have chosen and the text "It works!You can access the config. ru file via cPanel's file manager and start modifying the default code, namely:

app = proc do |env| message = "It works!\n" version = "Ruby %s\n" % RUBY_VERSION response = [message, version].join("\n") [200, {"Content-Type" => "text/plain"}, [response]] end run app

If you wish to modify the parameters of your application, such as adding modules, you can do so from the following section:

How to use a Ruby application on cPanel hosting

1- App Directory: This option lets you change the .om directory of your application.

2- App URI: which link your application should respond to from the web

3- Ruby version : This option allows you to select another Ruby version for the application.

3- Modules: In this field you can show, hide, add and remove different Ruby modules. When you start typing in the input field, the matches appear in a drop-down list. Choose the module you want from the drop-down list and click Add to add it to your application. If you click on the cross next to the module, the corresponding module will be deleted.

How to use a Ruby application on cPanel hosting

Note: when you add a module, the text colour will be orange to indicate that the module has not yet been installed. You will need to click on the Update button below to install all the depandances.

4- Execute command: You can execute simple commands from this field. For example, you can install modules manually or control other parameters.

5-Command for entering to virtual environement: You can enter the virtual environment of your application via the terminal using the command to the right of this sentence. You can then use all the Ruby commands and carry out all the manipulations via the cPanel terminal.

How to use a Ruby application on cPanel hosting

  • Update allows you to update your application. Use this command if you're adding a module or changing your Ruby version.
  • Reset resets the parameters of your application to zero, so that all installed modules are deleted.
  • Restart restarts the application.
  • Remove deletes the application completely, this operation is irreversible.

You are now able to use a Ruby application in cPanel, which will give you an easy introduction to basic programming concepts.

Don't hesitate to share your comments and questions!

Rate this article :

5/5 | 1 opinion

This article was useful to you ?

Article utileYes

Article non utileNo

Vous souhaitez nous laisser un commentaire concernant cet article ?

Si cela concerne une erreur dans la documentation ou un manque d'informations, n'hésitez pas à nous en faire part depuis le formulaire.

Pour toute question non liée à cette documentation ou problème technique sur l'un de vos services, contactez le support commercial ou le support technique

MerciMerci ! N'hésitez pas à poser des questions sur nos documentations si vous souhaitez plus d'informations et nous aider à les améliorer.


Vous avez noté 0 étoile(s)

Similar articles

1mn reading

How to use a Node.js application on cPanel hosting

1mn reading

How to use a Python application on cPanel hosting


Questions sur l'article
Mat Il y a 720 days
Comment déployer rails sur votre hébergeurs cpanel?
See the
1 answers
fabrice-LWS - Il y a 717 days
Bonjour, pour cela, vous pouvez vous aider de la procédure suivante: https://aide.lws.fr/a/1320
Utile ?

Ask the LWS team and its community a question