Rate this article :
5/5 | 1 opinion
This article was useful to you ?
Yes
No
Vous avez noté 0 étoile(s)
Sommaire
Procédure
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.
To access the Ruby Application Manager, you must first log in to your cPanel account.
Then click on the Setup Ruby App icon:
The following window will appear, allowing you to enter information about the new application you wish to create:
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:
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.
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.
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 ?
Yes
No
1mn reading
How to use a Node.js application on cPanel hosting
1mn reading
How to use a Python application on cPanel hosting