Is there a Tutorial for Installing Ruby, Rails, and FCGI via


#1

Hey guys,

Is there a Tutorial for Installing Ruby, Rails, and FCGI on a linux
box running apache remotely with SSH? I’m trying to get a VDS on
GoDaddy to support rails. Any help would be very much appreciated.

  • Jim

#2

Jim J. wrote:

Hey guys,

Is there a Tutorial for Installing Ruby, Rails, and FCGI on a linux box
running apache remotely with SSH? I’m trying to get a VDS on GoDaddy
to support rails. Any help would be very much appreciated.

Do you have ftp access to get stuff up to the server?

Are you root?

There are a few tutorials around that explain, to varying degrees, how
to get Apache playing nice with FCGI and Rails.

Off the top of my head, some possible stumbling blocks:

  • You need to compile code, and there is no compiler.

  • You need to compile code, but you do not have sufficient permissions.

  • You need to compile code that needs Apache devel files, and they are
    not available.

BTW, if the FCGI route doesn’t pan out, consider Zed’s SCGI Rails
script.

(I’ve managed fcgi with apache 1.3, but not with apache2. I’ve run
Rails apps with Apache2 + SCGI, but I’m, increasingly inclined towards
lighttp + fastcgi.)

James B.

http://www.ruby-doc.org - Ruby Help & Documentation
http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
http://www.30secondrule.com - Building Better Tools


#3

Yes Ezra that is the case but the VDS is running PLESK and my client
has two other sites running off of that via apache I’m assuming?
Will lighttpd be able to run along side that?

  • Jim

#4

Hey James!

I’m currently facing stumbling block number two which is that I do
not have sufficient permissions even when I login as root. I’ve
emailed technical support at GoDaddy about this and they emailed me
back alerting me that I should in fact have permissions but cannot
tell me anything about the problem because the client is using their
most basic VDS plan which is not managed. lol.

I’m sure I’ll get to the bottom of this eventually. If you have any
links to some tutorials I’m definitely open to them.

  • Jim

#5

On Dec 9, 2005, at 11:53 PM, Jim J. wrote:

Yes Ezra that is the case but the VDS is running PLESK and my
client has two other sites running off of that via apache I’m
assuming? Will lighttpd be able to run along side that?

  • Jim

Jim-

Here are some sample vhosts for proxying a lighttpd server behind an

apache server. You must make sure you can really get root on the box
though. Godaddy is a crappy host so I wouldn’t expect any help from
them.

http://brainspl.at/articles/2005/11/08/apache-vhost-to-proxy-thru-to-
lighttpd-on-a-higher-port

But you might also want to looking into mod_fcgi for apache as that

might be easier in your situation. Can you try to find out what linux
distro the server is running too? That will help with how the setup
goes.

Cheers-
-Ezra Z.
WebMaster
Yakima Herald-Republic Newspaper
removed_email_address@domain.invalid
509-577-7732


#6

Hi Guys,

I got an error trying to install Ruby Gems on my Virtual Dedicated
server. It looks like zlib is not installed:

/usr/local/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
18:in require__': No such file to load -- zlib (LoadError) from /usr/local/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:18:inrequire’
from /usr/local/ruby/lib/ruby/site_ruby/1.8/rubygems/
package.rb:9

The server is running on Red Hat 9. I’ve followed these instructions
to install zlib 1.2.3

This is the line causing the error in package.rb
require ‘zlib’

I’ve followed these directions to install zlib:
http://archive.linuxfromscratch.org/lfs-museum/5.1-pre1/LFS-BOOK-5.1-
PRE1-HTML/chapter06/zlib.html

Also, I’ve been using these directions to install ruby and gems…
Ruby installed successfully… however gems is choking due to the zlib
issue.

http://xmlareas.com/ruby-rails-howto.html


Jim J.
“A trustworthy individual.”
www.DontTrustThisGuy.com
(480) 235-5201


#7

I ran into this. Installing zlib devel files before building ruby
solved the problem. I had to do this for readline, as well, since
readline devel packages weren’t in by default. This was on a debian
system, so it was something like apt-get install readline-devel
zlib-devel before building ruby (from source, of course). I’m sure
there’s an analog in redhat if you google.

The key is that the ruby ./configure script needs to run after zlib
can be detected by it or ruby won’t support it.

Brian

On 12/15/05, Jim J. removed_email_address@domain.invalid wrote:

    from

On Dec 9, 2005, at 11:53 PM, Jim J. wrote:

Cheers-


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails


The years ahead pick up their dark bags.
They move closer. There’s a slight rise in the silence

then nothing.

(If you’re receiving this in response to mail sent to
removed_email_address@domain.invalid, don’t be concerned This is my new address,
but mail will be forwarded here indefinitely)


#8

On Dec 8, 2005, at 4:03 PM, Jim J. wrote:

Hey guys,

Is there a Tutorial for Installing Ruby, Rails, and FCGI on a linux
box running apache remotely with SSH? I’m trying to get a VDS on
GoDaddy to support rails. Any help would be very much appreciated.

  • Jim

Hey Jim-

By VDS do you mean a virtual dedicated server that you have root

access on? If so I highly recommend using lighttpd/fcgi instead of
apache. IF this is the case send me a note off the list and I can get
you some good instructions for getting all this stuff set up.

-Ezra Z.
WebMaster
Yakima Herald-Republic Newspaper
removed_email_address@domain.invalid
509-577-7732


#9

Ok now I’m having trouble installing the ‘fcgi’ and ‘mysql’ gems.

First FCGI:

This is the error I get:

ruby extconf.rb install fcgi -r – -with-fcgi-lib=/usr/local/fcgi/lib
–with-fcgi-include=/usr/local/fcgi/include\nchecking for
fcgiapp.h… yes
checking for FCGX_Accept() in -lfcgi… no

As you can see it’s finding the header file ‘fcgiapp.h’ but I have no
idea what this means: “FCGX_Accept() in -lfcgi… no”

Second with MySQL:

Here is the error I’m getting…

“which mysql” returns “usr/bin/mysql”

If I install as:
gem install mysql – --with-mysql-dir=/usr/bin/mysql

I get the following error:
ruby extconf.rb install mysql – --with-mysql-dir=/usr/bin/mysql
checking for mysql_query() in -lmysqlclient… no

Anyone have any idea what I’m doing wrong here?


Jim J.
“A trustworthy individual.”
www.DontTrustThisGuy.com
(480) 235-5201


#10

On 15/12/05, Jim J. removed_email_address@domain.invalid wrote:

“which mysql” returns “usr/bin/mysql”

If I install as:
gem install mysql – --with-mysql-dir=/usr/bin/mysql

I get the following error:
ruby extconf.rb install mysql – --with-mysql-dir=/usr/bin/mysql

That’s a binary, not a directory - try dir=/usr

It should be the directory that has subdirectories lib/ and include/
(holding the mysql shared libs and header files respectively).


Rasputin :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/


#11

Hey guys,
I resolved the fcgi issue by adding another ‘-’ in front of the with-
fcgi-lib requirement.

gem install fcgi -r – --with-fcgi-lib=/usr/local/fcgi/lib --with-
fcgi-include=/usr/local/fcgi/include

I’m still working on the mysql gem though.


Jim J.
“A trustworthy individual.”
www.DontTrustThisGuy.com
(480) 235-5201