• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Ruby on Rails - WORKING

Yup I used that and the stuff in the mod_ruby docs to set it up.

I may go back to fcgi, I signed up for the Apache user's e-mail list and am going to see if anyone there can help me diagnose why it won't work.
 
Originally posted by vinco
I tried to switch to "development" but I don't think it made any difference.

What's the difference between "development" and "production"

To my understanding, "development" allows you to see the Error Messages, right?

[/B]

To tell you thr truth, I'm just learning Rails. I've put it off for 2 years. I got ti to work in Plesk finally, and I thought I would share. Helping you guys out has taught me a lot, so IO don't mind.

Testing vs. Development vs. Production: It's just what you think, on the surface. Development is for when you are creating the app, Testing for running built-in or custom tests, and Production is for when you have it deployed already. In Development mode, the app is reloaded with each request, so you can see changes in the application immediately. You don't want that in production, when speed is a factor. It's a big performance boost.

During development, I think you can also start the Webrick server to use a certain environment. So you could run
Code:
script/server -e development
to use the development environment.
 
So... after weeks of fighting all of this and trying to get Rails to function under Apache, I have given up on it, sort of.

I have set up an alternative server (lighttpd) to serve the application on an alternate port and have decided to forget about using Apache for now.

I was able to determine that the issue is between Apache and both mod_cgi and mod_fcgi (I tried running it using both the regular CGI and Fast CGI methods with no success). The problem centers around the unix sockets used to communicate between the modules and the server. The sockets get created but when the module tries to connect, it is refused and Apache throws a 500 Server error.

I got frustrated to extremes and actually managed to break my server's DNS inadvertently while grasping at straws and trying to update the server packages to the latest versions. (Whatever you do DO NOT let yum or up2date install the bind.chroot RPM, it will break your DNS).

So anyway, after all of this frustration and angst, I finally have the server delivering the application forms and (mostly) working. There are some minor issues to resolve in the actual application with some hardcoded URLs the developer put in as well as a bit of a routing issue.

So this now leads me to my next adventure... figuring out how to set up routing.rb so it will point to the correct start page in the application. Right now, if I just browse to the application root and don't add a definite route, I get an error saying it doesn't know what to do with route "/"

Once I finish getting this set up, I will share a sanitized version (minus my domain info of course) of the lighttpd.conf file so that somebody else can use it if they need to.
 
Sorry you've had all of the problems. I had to struggle with it for a while before getting it. I've had no problems on two non-plesk servers (Ubuntu & Debian), but I've had some issues on others.

As for routes.rb, take your time reading the file. There's plenty of info there to get you started. If you need a controller name, look in app/controllers. They should be set up as *.rb files. For instance, if you want your default controller to be "test" (and you have a file named /app/controller/test.rb) then you can use a like like so:

Code:
map.connect '', :controller => "test"

Let me know if that works.
 
@zero: First of all thanks a lot for your great work. I just wanted to ask you if you would recommend to use this solution for a productive environment.

I think that would work but it changes a lot on the system and I think Plesk should support Rubby and when I change to much I'll have an incompatible system to Plesk. What would you think about that? What would you think about the guy who was telling that he has great contacts @ SWSoft (in the other RoR-thread)?

Greets and best regards and again big big THX for your work,
Dawn
 
I appreciate your thanks - no problem at all. :)

Personally, I don't think there's a lot to change on the system. There's three things (in my opinion) that SWSoft needs to provide:
  • DOCUMENTATION - I think that goes without saying.
  • Creation of vhost.conf automatically with the mod_fcgid settings if it doesn't already exist, and automatic reconfiguration via websrvmng
  • Upgrade the rails package to 1.2.* (although that's not a biggie)
There's probably some more, but I haven't reviewed in a while. Every other change is specific to the Rails application itself, and no matter what SWSoft does, you'll have to do some configuration by hand.
 
Well I've been trying to get my RoR app to work with PLESK 8 on a RHEL machine.

I've tried to follow the original post as much as possible but there were some differences.

I can run my app using script/server but when I try to access it through Apache I get the following errors in my error_log for the domain.

Code:
[Thu Mar 22 20:05:36 2007] [warn] mod_fcgid: can't apply process slot for /var/www/vhosts/{domain}/subdomains/rails/app/public/dispatch.fcgi
[Thu Mar 22 20:09:35 2007] [warn] mod_fcgid: can't apply process slot for /var/www/vhosts/{domain}/subdomains/rails/app/public/dispatch.fcgi

When I try to load my app through apache I get 503 errors.

I've tried searching but haven't found much.

I wish SWSoft would just update plesk to work with Apache 2.2 so that we could use mod_proxy_balancer and Mongrel to serve our Rails apps! :(
 
Originally posted by Moretocome
zero, they provide instructions about installing apps in Ruby at
http://download1.swsoft.com/Plesk/Plesk8.1/Doc/plesk-8.1-unix-administrators-guide/37435.htm

Wow - I hadn't seen that. I guess they did provide some documentation. Not much, though. Unfortunately, those are just basic Rails instructions. There's no documentation regarding setting up the vhost.conf, and no documentaion on mod_fcgid configuration. The rewrite rules are nice, though.
 
How can I try this settings with defaul a sample application? Did anybody tried these instructions out? I think if it would work in that way that would be a little bit easier than zero's instructions (which were very nice too).

Greets and best regards,
Dawn
 
There's a difference between developing an application and deploying one. Again, you should develop locally, and then publish on the server.

The instructions provided by SWSoft do not include a sample application. And they do not include anything about fcgi config settings, or local domain configuration. Frankly, I couldn't get a sample application running using their instructions, but I didn't try for long because they don't seem right (to me at least).

If you want a simple app, try the one that I posted on page 2 of this thread. Or take a look at the official Ruby On Rails website. Or, you can pick up the book "Agile Web Development With Rails" or "Rails Cookbook."

However, you must get mod-fcgid or regular cgi working. You must have the file ownership and permissions set correctly. You must do some work to get your application working.

Now, I'm not sure how these settings might change with the upgrade to Plesk 8.1.1. Perhaps I'll know after I upgrade next weekend.
 
Any idea what is causing WEBrick Server to crash when I try and connect with a browser?

Code:
=> Booting WEBrick...
=> Rails application started on [url]http://0.0.0.0:3000[/url]
=> Ctrl-C to shutdown server; call with --help for options
[2007-04-03 14:43:46] INFO  WEBrick 1.3.1
[2007-04-03 14:43:46] INFO  ruby 1.8.4 (2005-12-24) [i386-linux]
[2007-04-03 14:43:46] INFO  WEBrick::HTTPServer#start: pid=16670 port=3000
Libsafe version 2.0.16
Detected an attempt to write across stack boundary.
Terminating /usr/bin/ruby.
    uid=0  euid=0  pid=16670
Call stack:
    0xe03871    /lib/libsafe.so.2.0.16
    0xe03c5d    /lib/libsafe.so.2.0.16
    0x157d56    /usr/lib/libruby.so.1.8.4
    0x15f55c    /usr/lib/libruby.so.1.8.4
    0x16071b    /usr/lib/libruby.so.1.8.4
    0x179af9    /usr/lib/libruby.so.1.8.4
    0x153dfe    /usr/lib/libruby.so.1.8.4
    0x15cbb4    /usr/lib/libruby.so.1.8.4
    0x15d599    /usr/lib/libruby.so.1.8.4
    0x15ae13    /usr/lib/libruby.so.1.8.4
    0x15b618    /usr/lib/libruby.so.1.8.4
    0x159c98    /usr/lib/libruby.so.1.8.4
    0x15bbe2    /usr/lib/libruby.so.1.8.4
    0x15bf29    /usr/lib/libruby.so.1.8.4
    0x159c98    /usr/lib/libruby.so.1.8.4
    0x15d273    /usr/lib/libruby.so.1.8.4
    0x15d599    /usr/lib/libruby.so.1.8.4
    0x15ac5e    /usr/lib/libruby.so.1.8.4
    0x15bbe2    /usr/lib/libruby.so.1.8.4
    0x15bf29    /usr/lib/libruby.so.1.8.4
    0x1612c2    /usr/lib/libruby.so.1.8.4
    0x163485    /usr/lib/libruby.so.1.8.4
    0x153a01    /usr/lib/libruby.so.1.8.4
    0x15cbb4    /usr/lib/libruby.so.1.8.4
    0x15d599    /usr/lib/libruby.so.1.8.4
    0x15ae13    /usr/lib/libruby.so.1.8.4
    0x15c50a    /usr/lib/libruby.so.1.8.4
    0x15d273    /usr/lib/libruby.so.1.8.4
    0x15d599    /usr/lib/libruby.so.1.8.4
    0x15ac5e    /usr/lib/libruby.so.1.8.4
    0x16701f    /usr/lib/libruby.so.1.8.4
    0x15a72e    /usr/lib/libruby.so.1.8.4
    0x15a8bb    /usr/lib/libruby.so.1.8.4
    0x1612c2    /usr/lib/libruby.so.1.8.4
    0x16254e    /usr/lib/libruby.so.1.8.4
    0x141385    /usr/lib/libruby.so.1.8.4
    0x153dea    /usr/lib/libruby.so.1.8.4
    0x15cbb4    /usr/lib/libruby.so.1.8.4
    0x15d599    /usr/lib/libruby.so.1.8.4
    0x15ae13    /usr/lib/libruby.so.1.8.4
    0x15c50a    /usr/lib/libruby.so.1.8.4
    0x15bbe2    /usr/lib/libruby.so.1.8.4
    0x159c98    /usr/lib/libruby.so.1.8.4
    0x1612c2    /usr/lib/libruby.so.1.8.4
    0x15a99c    /usr/lib/libruby.so.1.8.4
    0x15d273    /usr/lib/libruby.so.1.8.4
    0x15d599    /usr/lib/libruby.so.1.8.4
    0x15ae13    /usr/lib/libruby.so.1.8.4
    0x15c50a    /usr/lib/libruby.so.1.8.4
    0x15d273    /usr/lib/libruby.so.1.8.4
    0x15d599    /usr/lib/libruby.so.1.8.4
    0x15ae13    /usr/lib/libruby.so.1.8.4
    0x15d273    /usr/lib/libruby.so.1.8.4
    0x15d599    /usr/lib/libruby.so.1.8.4
    0x15ae13    /usr/lib/libruby.so.1.8.4
    0x169395    /usr/lib/libruby.so.1.8.4
    0x1699d7    /usr/lib/libruby.so.1.8.4
    0x169c53    /usr/lib/libruby.so.1.8.4
    0x153ddf    /usr/lib/libruby.so.1.8.4
    0x15cbb4    /usr/lib/libruby.so.1.8.4
    0x15d599    /usr/lib/libruby.so.1.8.4
    0x1640f3    /usr/lib/libruby.so.1.8.4
    0x15aaec    /usr/lib/libruby.so.1.8.4
    0x1612c2    /usr/lib/libruby.so.1.8.4
    0x15a99c    /usr/lib/libruby.so.1.8.4
    0x15bf29    /usr/lib/libruby.so.1.8.4
    0x15bf29    /usr/lib/libruby.so.1.8.4
    0x15d273    /usr/lib/libruby.so.1.8.4
    0x15d599    /usr/lib/libruby.so.1.8.4
    0x15ae13    /usr/lib/libruby.so.1.8.4
    0x15c50a    /usr/lib/libruby.so.1.8.4
    0x15bbe2    /usr/lib/libruby.so.1.8.4
    0x15d273    /usr/lib/libruby.so.1.8.4
    0x15d599    /usr/lib/libruby.so.1.8.4
    0x15ac5e    /usr/lib/libruby.so.1.8.4
    0x169395    /usr/lib/libruby.so.1.8.4
    0x1699d7    /usr/lib/libruby.so.1.8.4
    0x169c53    /usr/lib/libruby.so.1.8.4
    0x153ddf    /usr/lib/libruby.so.1.8.4
    0x15cbb4    /usr/lib/libruby.so.1.8.4
    0x15d599    /usr/lib/libruby.so.1.8.4
    0x15ac5e    /usr/lib/libruby.so.1.8.4
    0x169da6    /usr/lib/libruby.so.1.8.4
    0x169de6    /usr/lib/libruby.so.1.8.4
    0x169e1b    /usr/lib/libruby.so.1.8.4
    0x804861f   /usr/bin/ruby
    0x50bd7a    /lib/libc-2.3.6.so
Overflow caused by memcpy()
Killed

Thanks
 
That one is WAY beyond me! The problem (I think) is when libsafe finds an error:

"Detected an attempt to write across stack boundary."

I would guess that upon startup WEBrick allocates a certain amount of system memory and then somehow it wasn't large enough. That's a wild guess, though. I don't know enough about it. Looks like no one else has posted this issue online before. You should probably ask around at RailsForum.com
 
script/about fails

Code:
-bash-3.00$ script/about
./script/../config/boot.rb:18:in `require': no such file to load -- rubygems (LoadError)
        from ./script/../config/boot.rb:18
        from script/about:2:in `require'
        from script/about:2

???

T
 
Sounds like your Rails install is incomplete or your app didn't generate completely. I believe it's looking for the initializer library.
 
Back
Top