• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Ruby?

S

society

Guest
Hello,

Ruby (+fcgi) is installed but how to Admin or Activate that ruby?
 
I believe that you have to enable mod_fcgid in the domain setup. Haven't played with it myself yet though.
 
After installing 8.1 go back to the updater. Check FastCGI and Ruby On Rails and install.
 
Does anybody have an example-application that is easy to install and that can be used for testing if it works?
 
Hi Jamai,

It's pretty easy. Via the command line, do this:

Code:
cd /a/website/path/

For me it's /var/www/websitedomain.com/httpdocs/

Now we need to create our app:

Code:
rails myapp

A bunch of text will run by the screen. It's creating the files and folders necessary for the rails app.

Now we need to get into the new app, and test the application through the builtin webrick server

Code:
cd myapp
ruby1.8 script/server

You'll see some text like this:

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
[2006-12-17 15:08:01] INFO  WEBrick 1.3.1
[2006-12-17 15:08:01] INFO  ruby 1.8.2 (2005-04-11) [i386-linux]
[2006-12-17 15:08:01] INFO  WEBrick::HTTPServer#start: pid=6685 port=3000

The port number (in this case 3000) will show you where you can see if Rails is working. Go to websitedomain.com:3000/ and you should see the Rails "Welcome Aboard" message. That means Rails is working.

VERY IMPORTANT: After you are done, go back to the command line and press Control+C to stop the Webrick web server.

FYI - This is only meant to show you that it is working properly. Development should be done on your own machine. Deployment of your app will probably require additional work.
 
Thanks for the help!

I too am trying to test out Ruby - and your system check worked like a charm... now to start development and deployment.

Thanks again

- Brian
 
Well, the problem that everyone is having now is getting FastCGI to work properly. I started working on a reply to the guy who posted yesterday, but I can't get it to work ... yet. If you figure out how to get FastCGI to work properly, let everyone else on the board know.
 
I agree. This needs to be better documented. I have tried the test information above and it just did not work for me. I have the latest Plesk 8.1 on centos 4 VPS. I have confirmed that all packages are installed and even rebooted the VPS. I had to create a symlink just to get rails command to work. Then I was able to create the myapp. When I tried to run the developement test I got this.

# ruby script/server
./script/../config/boot.rb:18:in `require': No such file to load -- initializer (LoadError)
from ./script/../config/boot.rb:18
from script/server:2:in `require'
from script/server:2

This process should not be so hard. I have a ROR development system setup of my main system and have going throug the ROR tutorials and this seems to be a very fast development process I would like to use.

Does anyone know how to work it so the site can be in the root of the domains instead of domain.com/<app>/public/.

Regards
 
The problem with building from source is that is is not a solution for everyone in this forum. The issue is many of us are using Virtuozzo as well as HSPc where using templates is the way to manage our business with a proper workflow and upgrade path. The best solution is going to be getting the best practice and proper information from SWSOFT and the Plesk team. I have had a busy week, I will be in their offices on the 19th and will talk to the correct people to try to get some information flowing down to us.
 
I tried the command line as indicated above but all I got was "-bash: rails: command not found", and I know that Rails is installed and implemented on the server.

I set up one test site a while back but now that I have an actual client wanting it I forgot how I got there.
 
Sounds like it either wasn't completely installed, was a custom install or your path got messed up somehow.

Try the commands "whereis rails" to see if it's installed, and "which rails" to find if it's located in your PATH. You may also need to fix your bash profile.
 
Here's what did work:

# cd /opt/ruby/bin
# ./rails /home/httpd/vhosts/[domain.com]/httpdocs/

(I have the old directory structure)

HOWEVER, now I get to the /public page and the Environment link says "Application error Rails application failed to start properly"

I found a README_FOR_APP doc that said to run rake, but that didn't work.

# ./rake appdoc
rake aborted!
No Rakefile found

Also the client says I need to install Mongrel.

Also, where is Ruby Gems?
 
You have a lot of stuff going on here, so I'll try to help where I can.

Your rails install is in a different location than I'm used to, but that shouldn't be a problem. You can fix your system to use "rails" instead of /opt/ruby/bin

Did you install ruby and rails via the Plesk interface, or by hand?

As for the "Envoronment" link - it all depends on your version of rails. The 1.16 version was a bug fix, and in the releas notes for 1.1.6 they stated that the environment link was broken. This isn't a Plesk issue - it's a Rails issue.

Mongrel is a ruby web server. You can run it, but it isn't an automatic install, and I don't know much about it. It runs fine on my workstation and my development server, but neither of those are Plesk. The Plesk install of ruby will work with Apache 2.

Ruby Gems is a way to install and update rails and rails applications. You need to install gems manually, then you can use commans like 'sudo gem install mongrel' and 'sudo gem update rails'
 
I installed RoR by running the Plesk install from the Updates section. Then i went looking for it and found it in /opt/. Then I found a Readme somewhere that said how to configure it for a domain. That worked but that was the end of my string.

So what's the simplest way to install gems manually and why doesn't the Plesk installer finish the job instead of leaving it at a dead end?
 
Gems is ONE way to install Rails, but not the only way. Plesk installs your package maintainers' version. Yours were installed through your apt sources.

You should be able to install it via gems, but I recommend reading the documentation carefully first. You could potentially turn off web services via apache if you are not careful.
 
Back
Top