Are you using Bluehost shared hosting, and you’re having quite a hard time deploying your Ruby on Rails app there?
Would you like to know if using Bluehost with rails is a possibility?
While it is true that a Ruby on Rails web application might not work with every hosting service, it works with Bluehost for sure.
This tutorial talks about all the important questions that will guide you on the first step and the consecutive steps for the Ruby on Rails development on Bluehost.
Let’s dive into the process.
Does Bluehost Support Ruby On Rails?
Being one of the leading hosting providers, Bluehost offers a vast array of important features, including Ruby on Rails compatibility. However, before you buy a Bluehost plan for your web application, you should also remember that the platform has several issues:
- Ruby on Rails web applications are often resource-intensive, and Bluehost is hard on resource-intensive websites and applications. If your Rails app has a long-running request that uses the CPU, Bluehost will start throttling your CPU after a few seconds. As a result, the long-running request will take forever to complete.
- To run your Ruby on Rails app on Bluehost, you’ll have to get SSH access enabled.
- When you install Ruby gems on your Bluehost shared hosting account, some of them need root access for installation and resolving the dependencies.
However, when you are hosted on a shared account, there is no root access allowed for your account. Bluehost only provides root access for VPS hosting and dedicated hosting. You have to get in touch with Bluehost through live chat and ask them to activate the root access for you.
If that does not work for you then you should consider getting a VPS plan for yourself.
How To Get Ruby On Rails To Work On Bluehost?
Bluehost makes use of the Phusion Passenger which allows the users to deploy any application that is rack based. A rack is a modular interface between the web applications and the web servers for the Ruby programming language.
Phusion Passenger is an app server designed to run and auto-manage web apps seamlessly. It has many features that work for managing modern web apps, and this makes it an invaluable tool when deploying a Ruby on Rails app.
The use of Phusion Passenger ensures a great deal of scalability, stability, reliability, and security.
For using Ruby on Rails, first, you have to sign up for a Bluehost web hosting plan. You can set up Ruby on Rails with the procedure mentioned below:
Step 1: SSH Access
Your Bluehost account will have SSH access enabled by default. You’d have to use the cPanel to log in and verify the SSH connection by creating an authentication key. Alternatively, you may also contact Bluehost and request them to set it up for you.
Bluehost has a proper guide in place that walks you through the process of connecting your Bluehost account to SSH.
Step 2: Addon Domain Or Sub-Domain
Ideally, you should be setting the IP up on a separate directory for using Ruby on Rails but you can also do it on an addon domain or a sub-domain.
You can easily set up an addon domain or a sub-domain through the Bluehost control panel. If you opt to use an addon domain, you have to ensure that you have pointed the domain to the Bluehost name servers.
Step 3: Set Up The Ruby On Rails App
Login to the Bluehost cPanel and in the “Programming” section click on the Ruby on Rails icon. Create a new app in this section and you can call it “myapp”.
Next step is to set the application path to “/railapps/myrubyapp” and select the “Production” environment and click on “create”. After this step, your application will be created right away.
Step 4: Create A Symbolic Link
This step needs direct SSH access. As mentioned earlier, you can get the SSH access activated. You have to click on “SSH” in the security section. Here you have to point the “myapp” directory to the real directory of cPanel and execute some important commands through SSH.
Step 5: Welcome Page
If you have executed all the steps mentioned above accurately, then the Ruby on Rails welcome page will be shown on the main domain.
Step 6: Customizing .htaccess File and Launching The App
All you have to do is verify the welcome page and customize the .htaccess file. Now create a database through ‘MySQL databases’ in the cPanel, create a database username, and connect them.
You should now be able to view the app by visiting your main domain using a browser.
However, if Bluehost is your hosting provider and you are willing to manage your server along with dealing with the possible latency issues and downtime, then this is worth it.
An important aspect that you should be aware of about using Ruby on Rails on shared hosting is that the environment can change. While Bluehost ensures that the customers using Ruby on Rails are notified in case of any updates, there are possibilities that someone might get missed out or might forget to make the required changes.
To prevent your application from breaking while the updates are getting executed on the server, you can “freeze” the application. In this case, your application will function with the version of Ruby on Rails that it was created with.
The best alternative to Bluehost for deploying a Ruby on Rails app is the Hostinger VPS plan.
Hostinger is a better choice because the VPS plans on Hostinger cost around the same as Bluehost’s shared hosting plans. Moreover, Hostinger is quite app-friendly with Ruby on Rails, which ensures a seamless user experience.
Verdict On Bluehost Ruby On Rails
Based on real experience, it is observed that Getting a Ruby on Rails application deployed on Bluehost can be extremely time-consuming. Not only does it involve a lot of hassle, but the future stability of your app is uncertain too.
I wouldn’t recommend using Bluehost if you wish to run a Ruby on Rails app, due to the following reasons:
- Although Bluehost has a helpful tech support team in general, you can’t rely on them for the Ruby on Rails app. Most of their knowledge and expertise is about WordPress.
- Regardless of your hosting service provider, shared hosting is not the ideal choice for a Ruby on Rails app. Ideally, you should opt for a VPS but VPS plans at Bluehost are expensive.
- If you still decide to deploy your app using a shared hosting plan from Bluehost, you should expect poor performance.
Hence, although Bluehost ‘can’ host a Ruby on Rails app, Hostinger VPS plans are far better for the purpose.
Does HostGator support Ruby on Rails?
Yes, you can run a Ruby on Rails app on Hostgator. The hosting service provider offers great hosting plans for Ruby on Rails, including free Ruby on Rails hosting for a month. The shell access option is available for all plans.
HostGator also offers pre-installed gems, which aid in the easy development and deployment of Ruby on Rails apps.
Does GoDaddy support Ruby on Rails?
While GoDaddy does support Ruby on Rails, it is available only on their Deluxe and Unlimited hosting that runs Hosting Configuration 2.0 and above. GoDaddy isn’t your best option for Ruby on Rails hosting because GoDaddy’s Ruby on Rails hosting service isn’t quite up to date, and deploying your application can prove to be quite a hassle.
Does Hostinger support Ruby on Rails?
As mentioned earlier, Hostinger is one of your best choices when seeking a hosting provider for a Ruby on Rails application. However, it’s possible only on their VPS plans, as the shared hosting plans on Hostinger do not support Ruby on Rails.
This shouldn’t be a big issue, as their VPS plans are reasonably priced.