How to deploy Ruby on Rails application via cPanel on shared host?
Asked Answered
M

3

8

I am in the process of learning Ruby on Rails and things have been going smoothly - up until I tried to deploy one of my test applications to my shared hosting account.

I use Host Gator and was able to successfully create a new Ruby on Rails app via cPanel and run it. The only problem is that when you create a new app this way, it populates its directory with a blank application - as would rails new app_name locally. When I delete the files and folders in this directory and replace them with my own, then attempt to run the app, cPanel says that it is running on the confirmation page but it never actually starts. I am not receiving any error messages either.

The host seemed rather stumped, stating that it should be a matter of deleting the initial files and folders and replacing them, then running. The app works fine locally so I do not think that it is a code issue. In my research I came across Passenger, although it is way over my head and it would appear that you really need to have total control over Apache to make it all work, including ssh.

If it makes any difference, the apps I made locally were put together using an installation of Rails Installer and are scaffolded. For testing I am using a bare minimum app with about three fields in the table.

What am I missing? Any help would be appreciated.

Margotmargrave answered 2/6, 2011 at 19:20 Comment(7)
Deploying a Rails app to a shared hosting environments is generally a nightmare. Have you considered Heroku or EngineYard?Observe
Until last week I was primarily a PHP developer but I wanted to branch out. Things were going smoothly as long as I was running on localhost but this has indeed been a nightmare. Making VERY slow progress, it turns out that the commands I have been using are for Rails 3 and Host Gator is running an older version. Once I used the older commands, I was able to do things like scaffolding. Now trying to figure out why I am getting a 404 error when I try to access the pages generated by script/generate scaffold.Margotmargrave
Also, CakePHP might be a rip-off of RoR but darn it, it just works! lolMargotmargrave
Just adding my two cents, inside a shared environment rails is a nightmare. Think about using heroku or engine yard.Trunnel
I've been down the cPanel and rails path once upon a time, seriously don't go there you will literally drive yourself to insanity! Trust me 'git push heroku master' is your friend.Sarina
I was hoping to expand some existing client sites with Rails apps, all are hosted on shared domains. I am working in a very rural location and the budget of my clients and myself is limited, so the suggested services are way out of my price range. Made a tiny bit of progress, the index of a scaffold generated site will show up as long as the app is run in Development mode but other parts result in a 404 error. A big part of this is just my lack of experience, hopefully the next time will be less difficult.Margotmargrave
This -> forums.cpanel.net/threads/…Ladoga
B
0

Maximum supported versions on 26/10/2013 are:

Ruby 1.8.7 RubyGems 1.8.25 Rails 2.3.18

Anything newer than that is a near guaranteed breakage and cPanel & WHM will be incapable of utilizing it in any way, shape, or form.

We can assist you with removing your existing Ruby on Rails installations and reverting them back to cPanel supported and sanctioned versions (Ruby 1.8, RubyGems 1.8, and Rails 2). That is the only thing we can do for you at this time.

If you want to use any versions newer than this, then you will be unable to use the cPanel & WHM interfaces or management tools for it -- they simply will not work. You will then have to manually manage your RoR install by yourself through command line exclusively. None of it would fall under the scope of cPanel support.

Bicknell answered 26/10, 2013 at 17:51 Comment(0)
S
0

You can use http://ndeploy.in which is a third party plugin to integrate Rails Hosting via Phsuion Passenger in cPanel .

Synchromesh answered 2/4, 2015 at 10:49 Comment(0)
S
-1

Just to let others who is using Cpanel with rails know.

I was able to use Cpanel to create a rails app, start it, and do the redirection all within Cpanel. Nothing to modify or change. Quite straightforward for me.

So I guess it would be easier to do the development work straight on the server itself.

Have not tried to deploy a locally developed rails to shared server, or any per se. But I'm guessing we could create rails with Cpanel and replace the files in the directory generated.

Schlosser answered 25/1, 2012 at 12:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.