Deploying Rails App

Support for webhosts that use CentOS
Post Reply
paul_h
Posts: 3
Joined: 2011/01/25 23:56:01

Deploying Rails App

Post by paul_h » 2011/01/26 00:27:13

Hi All,

Hope this is the correct place to post.

I have a CentOS 5 server with Parallels Plesk Panels and am trying to get a Rails app up and running.

Before you scream at me to go to a rails forum or group, I have the rails app deployed via capistrano fine into the var/www/vhosts/[domain]/[app]/current/public folder, and the migrations ran fine - MySQL DB tables configured correctly. (Have just run the rails console on the server and added items to DB fine). What I need, I think, is help from the server side to point to the app so that apache routes to passenger which allows rails to route to the correct controller?

Before I start documenting exactly where I am at, I'd be grateful to know if this is something I can get help with here? Is there anyone out there with a CentOS server that deploys their own rails apps?

I really don't want to use any PaaS providers (too many restrictions), so I have set up a dedicated cloud server with my regular host that gives me root access. This is my first attempt at setting up my own server and am looking to learn (don't need help with ruby or rails themselves) - so if someone can help or point me in the right direction, I would be eternally grateful.

I can re-image to any number of *nix flavours, but have chosen CentOS because I have read good things. Hopefully someone out there can help. Once I get one app configured and working I can get down to pushing out what I really want to get done.

FYI

ruby 1.9.2
rails 3.0.3

Thanks

Paul

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Deploying Rails App

Post by pschaff » 2011/01/26 01:59:07

Welcome to the CentOS fora. Reading [url=https://www.centos.org/modules/newbb/viewforum.php?forum=47]FAQ & Readme First[/url] is recommended for new users.

No screaming, but if you want help here please start by reading the above and provide some additional relevant information. The CentOS version of ruby is 1.8.5-5.el5_4.8 and I see no 1.9.2 in any of the usual [url=http://wiki.centos.org/AdditionalResources/Repositories]Repositories[/url]. I find rubygem-rails-2.1.1-2.el5 in EPEL. Plesk tends to have its own non-CentOS way of doing things, as explained in [url=http://wiki.centos.org/TipsAndTricks/BrokenVserver]Broken Virtual Server[/url]. Where did you get the software you are trying to configure and what can you show us after reading [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=25128&forum=47]How to provide information about your system[/url]?

paul_h
Posts: 3
Joined: 2011/01/25 23:56:01

Re: Deploying Rails App

Post by paul_h » 2011/01/26 19:35:32

Hi Phil,

I'll provide as much useful info as necessary (will post it shortly), I was just trying to get an initial feel for whether I could get the help I needed before digging any deeper.

I installed ruby 1.9.2 from source which comes with rubygems 1.3.7. Then I installed rails 3.0.3 along with the passenger gem - I'm not interested in using fastcgi - passenger is way more efficient.

All dependencies (zlib-devel, openssl-devel etc) were installed and updated, and ruby irb and rails console both run fine from the command line when I log into the server, so must assume they are installed ok.

I have read in a number of places that CentOS packages are usually a fair way behind when it comes to ruby and rails, which is why I built from source - I need ruby 1.9.2 and rails 3 (using rails 2.1.* from the CentOS repo is a definite no-no, way out of date) - is this (building from source) going to be a problem?

I then deployed a very basic rails app I whipped up just to try and get the deployment onto CentOS sorted, but this is where I am falling down. I can't get the domain to route to the rails app through apache then passenger, it defaults to the normal holding page in httpdocs.

If plesk has a non-centos way of doing things then I'll go and post on the parallels site too (the plesk panel does provide an option to 'install fastcgi for ruby and rails support', although as mentioned earlier, I am in no way insterested in fastcgi, so if this is the issue, I'll have to switch to another OS), and I'll post the question to the rails group.

If any of my requirements above prohibit me from using CentOS, please can you post and let me know. I have a few things to do on a current project, then I'll get the additional system info later on and post it all here.

Thanks

Paul

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Deploying Rails App

Post by pschaff » 2011/01/26 20:23:51

You may want to read [url=http://wiki.centos.org/FAQ/General#head-472ce8446ebcfc82ca1800f775ba0e629ac835c7]FAQ#20. Where can I get the latest version of XyZ.rpm for CentOS? I cannot find it anywhere.[/url]

If you need the latest packages then CentOS 5 may not be for you. OTOH, CentOS 6 will be coming soon and may be a better fit. For now I suspect your best bet is the Plesk support resources.

paul_h
Posts: 3
Joined: 2011/01/25 23:56:01

Re: Deploying Rails App

Post by paul_h » 2011/01/26 23:24:34

Thanks Phil,

I'll give Plesk and the Rails groups a go, and if I get any success I'll try and post back here for others to reference.

Cheers

Paul

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Deploying Rails App

Post by pschaff » 2011/01/27 01:02:40

Please do, and good luck.

Post Reply

Return to “CentOS 5 - Webhosting Support”