Ruby on Rails Auto Installer

adam-pca

Verified User
Joined
May 4, 2004
Messages
21
Hi,

I created this addon for a fully automated install of Ruby on Rails and FastCGI.

The script should download and install all components required for Ruby on Rails.

Guide:

wget pcactive.org/da/setup.ror.sh
chmod +x setup.ror.sh
./setup.ror.sh

Current Version:

RoR Installer Version: 1.0-DA
Last updated: 07/10/05

Confirmed Supported OSs:

None listed, as of yet.

If this installer works well for you please let me know so I can add it to this list.

Thanks,
Adam
 
Last edited:
Well on CentOS 3.5 there seems to be some problems.

The first problem is that the tar.gz file is never recieved with wget. After getting the file myself it is never extracted. After extracting the file by hand there is a slew of timestamp errors such as:

tar: ror_install-1.0da/scripts/install.sh: time stamp 2005-10-06 13:55:12 is 119598 s in the future
ror_install-1.0da/md5sums
tar: ror_install-1.0da/scripts: time stamp 2005-10-06 13:03:20 is 116486 s in the future
tar: ror_install-1.0da/md5sums: time stamp 2005-10-06 05:23:38 is 88904 s in the future
ror_install-1.0da/install.sh
tar: ror_install-1.0da/install.sh: time stamp 2005-10-06 13:05:52 is 116638 s in the future
tar: ror_install-1.0da: time stamp 2005-10-06 13:06:08 is 116654 s in the future

After going to the directory, I can run install.sh by hand and it seems to download all the needed files without any problems.

it then shows this:

Code:
# Install RubyGems
echo ;
echo Installing RubyGems ...
./scripts/install.sh: line 28: cd: rubygems-: No such file or directory
./scripts/install.sh: line 29: ruby: command not found

Installing rails...
./scripts/install.sh: line 37: gem: command not found

./scripts/install.sh: line 78: syntax error near unexpected token `('
./scripts/install.sh: line 78: `        echo "Add mod_fascgi apache configuratio                                    n to httpd.conf? (y/n) "'
################################
#       Install Complete       #
################################

Will troubleshoot shortly ;)
 
*update*

Seems that in the scripts/install.sh file you are using $RUBY_VER (or was it $RUBYVER) in any event, it is not being shown, so it is trying to go into ruby- without putting in the version number. You are also missing an end quote on the second echo in that script

"Installing ruby $RUBYVER


*additional update*

changed:

Code:
# Install RubyGems
echo "";
echo "Installing RubyGems $RUBYGEMS_VER...
cd rubygems-$RUBYGEMS_VER
ruby setup.rb

to

Code:
# Install RubyGems
echo "";
echo "Installing RubyGems 0.8.11"
cd rubygems-0.8.11
ruby setup.rb
 
Last edited:
justadollar said:
Well on CentOS 3.5 there seems to be some problems.

The first problem is that the tar.gz file is never recieved with wget.

After getting the file myself it is never extracted.

The tar.gz seems to be in the correct location, will test this further.

I just looked in setup.sh, it appears I left out (forgot!) the extraction process. Fixed now.

justadollar said:
After extracting the file by hand there is a slew of timestamp errors such as:

tar: ror_install-1.0da/scripts/install.sh: time stamp 2005-10-06 13:55:12 is 119598 s in the future
ror_install-1.0da/md5sums
tar: ror_install-1.0da/scripts: time stamp 2005-10-06 13:03:20 is 116486 s in the future
tar: ror_install-1.0da/md5sums: time stamp 2005-10-06 05:23:38 is 88904 s in the future
ror_install-1.0da/install.sh
tar: ror_install-1.0da/install.sh: time stamp 2005-10-06 13:05:52 is 116638 s in the future
tar: ror_install-1.0da: time stamp 2005-10-06 13:06:08 is 116654 s in the future

Perhaps possible the time on the server it was created on is ahead if your own (GMT)?

justadollar said:
After going to the directory, I can run install.sh by hand and it seems to download all the needed files without any problems.

OK, so we know that step is all good.

justadollar said:
it then shows this:

Code:
# Install RubyGems
echo ;
echo Installing RubyGems ...
./scripts/install.sh: line 28: cd: rubygems-: No such file or directory
./scripts/install.sh: line 29: ruby: command not found

Installing rails...
./scripts/install.sh: line 37: gem: command not found

./scripts/install.sh: line 78: syntax error near unexpected token `('
./scripts/install.sh: line 78: `        echo "Add mod_fascgi apache configuratio                                    n to httpd.conf? (y/n) "'
################################
#       Install Complete       #
################################

Looks like it hasn't installed there. I'll take a look at the post below, modify it and test it in a few mins. :)

Adam
 
justadollar said:
*update*

Seems that in the scripts/install.sh file you are using $RUBY_VER (or was it $RUBYVER) in any event, it is not being shown, so it is trying to go into ruby- without putting in the version number. You are also missing an end quote on the second echo in that script

"Installing ruby $RUBYVER


*additional update*

changed:

Code:
# Install RubyGems
echo "";
echo "Installing RubyGems $RUBYGEMS_VER...
cd rubygems-$RUBYGEMS_VER
ruby setup.rb

to

Code:
# Install RubyGems
echo "";
echo "Installing RubyGems 0.8.11"
cd rubygems-0.8.11
ruby setup.rb

OK, found this problem, it appears although I misplaced the config reading in that file. Should work fine now.

If you're interested what was missing:

# Read CONFIG foile for versions
RUBY_VER=`cat CONFIG | grep RUBY_VER | cut -d\ -f3`;
RUBYGEMS_VER=`cat CONFIG | grep RUBYGEMS_VER | cut -d\ -f3`;
FASTCGI_VER=`cat CONFIG | grep FASTCGI_VER | cut -d\ -f3`;
MODFCGI_VER=`cat CONFIG | grep MODFCGI_VER | cut -d\ -f3`;

Adam
 
Hello:

I tried to install it but at the end it gave me the following errors:

Assuming all installed OK...
./scripts/install.sh: line 79: gem: command not found
./scripts/install.sh: line 100: syntax error near unexpected token `['
./scripts/install.sh: line 100: `if [ $MODFCGIAUTO = on ]; then'
./install.sh: line 32: syntax error: unexpected end of file
./setup.ror.sh: line 109: ./setup.ror.sh: No such file or directory

Any thoughts ?

Thanks :)
 
Hi,

What OS is that? Also, if it got that far it's probably installed but not yet added to apache configuration.

Give the following command a try (without quotes):

'gem list'

Please get back to me with the output of that by either PMing me it or replying here.

That'll give me a better idea of what needs to be done/changed to complete the installtion.

:)

Adam
 
This is on a Fedora system.

gem list gives me:

-bash: gem: command not found
 
ViAdCk said:
This is on a Fedora system.

gem list gives me:

-bash: gem: command not found

Dosn't look like it installed, I'll take a look at fixing it up for Fedora ASAP. :)

Adam
 
blacknight said:
Is there any ETA on a release for this plugin?

We'd be very interested in running it on Centos

Hi,

You can get it via,

wget pcactive.org/da/setup.ror.sh
chmod +x setup.ror.sh
./setup.ror.sh

At present I'd say it was beta quality, but if you have any issues with it feel free to contact me and I'll work them out with you. :)

Adam
 
If you need a fedora box to do some testing, just send me a PM.

Cheers :)
 
Hello

I have tries your auto installer n a fecora core 2 machine with DA .

I get this error :


Assuming all installed OK...
/usr/bin/gem:3:in `require': No such file to load -- rubygems (LoadError)
from /usr/bin/gem:3
./scripts/install.sh: line 100: syntax error near unexpected token `['
./scripts/install.sh: line 100: `if [ $MODFCGIAUTO = on ]; then'
./install.sh: line 32: syntax error: unexpected end of file
./setup.ror.sh: line 109: ./setup.ror.sh: No such file or directory


Someone nows how to fix that ?
Thx
Sky
 
Looks like I have run into the same issue. I am running DA 1.254 on Centos 4.1 with the latest fixes. I am running the script from /usr/local/directadmin/scripts/packages.
Everything looks like it compiles alright but then the script ends with this:

Assuming all installed OK...
./scripts/install.sh: line 79: gem: command not found
./scripts/install.sh: line 100: syntax error near unexpected token `['
./scripts/install.sh: line 100: `if [ $MODFCGIAUTO = on ]; then'
./install.sh: line 32: syntax error: unexpected end of file
./setup.ror.sh: line 109: ./setup.ror.sh: No such file or directory
[root@athena packages]# gem list
-bash: gem: command not found

Any help is appreciated.
 
RedHat Fedora 3.0 same error

Code:
./scripts/install.sh: line 79: gem: command not found
./scripts/install.sh: line 100: syntax error near unexpected token `['
./scripts/install.sh: line 100: `if [ $MODFCGIAUTO = on ]; then'
./install.sh: line 32: syntax error: unexpected end of file
./setup.ror.sh: line 109: ./setup.ror.sh: No such file or directory
 
I have things working now. There is something in the script that is still not right to make it work automatically, but using your steps in the install.sh script, I was able to get ruby, gems and fastcgi compiled and working and create a rails app. I think if we can figure out the syntax issues in your script, this will be a great product. Thanks for your efforts!
 
Back
Top