As many developers may not be aware, our cPanel hosting accounts support a wide variety of software development platforms beyond the classic PHP and MySQL apps. In this article, we’ll show you how you can create a Ruby app, with Ruby on Rails if you require it, on your server using cPanel.
Developing Ruby Apps on Shared Hosting
As you may already know, developing a Ruby app often requires the installation of some additional modules. The problem here is that shared hosting does not allow the user to install the additional packages.
But with the InMotion Hosting shared plans, you can take advantage of a “virtual environment” to host your apps. Inside these virtual environments you can get all of the modules you may need, including Rails, Node, and many other popular modules.
Setup Ruby App in cPanel
Setting up the virtual environment for your Ruby application is as simple as clicking a button in cPanel and filling in some information.
- Log into cPanel
- Select Setup Ruby App under Software
- Choose the Ruby version in the dropdown menu
- Fill in a directory name to house your app
- Select the domain your app will run under
- Click Setup
Adding Additional Modules
Ruby on Rails support is installed by default, but if you need to add any other modules, you can click Show under modules in the Existing applications section:
And you can search modules and add as needed.
If everything was set up correctly you should see a message saying, “It works!”, followed by the Ruby version number, when you navigate to your domain:
Getting Your App On The Server
Much of the development of your Ruby app may be done on your personal computer. Once you have setup the app to your liking, you can use FTP to upload it to the directory you chose in the setup phase. Then your app will be live on the web.
For those users who are familiar with Git version control, you can also sync your project that way. Git allows an easy way to keep your local coding in sync with the production server. Likewise, you could use a third-party deployment via GitHub or another third-party service. However, depending on the repository configuration your source code may be visible to the public. Check out our full guide on using Git in cPanel.