[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

installed ruby on linux without su access

Eko Budi Setiyo

2/17/2005 2:11:00 AM

Hi all,

Beside http://www.rubygarden.org/ruby?RubyW...
is there any tutorial to help me really install ruby on linux without
root access.
I am trying to installed it on hosting company where I host my website.

regards
Eko



16 Answers

James Britt

2/17/2005 2:46:00 AM

0

Eko Budi Setiyo wrote:
> Hi all,
>
> Beside http://www.rubygarden.org/ruby?RubyW...
> is there any tutorial to help me really install ruby on linux without
> root access.
> I am trying to installed it on hosting company where I host my website.

What sort of access do you have? telnet? ssh? ftp?

I've had success compiling Ruby (including running autoconf) on a remote
hosting site where all I had was ftp and http access; I wrote perl and
php scripts, called them through a Web page, and ended up with ruby
installed under my home dir.

Life got better after that.



James


Eko Budi Setiyo

2/17/2005 3:21:00 AM

0

James Britt wrote:

> Eko Budi Setiyo wrote:
>
>> Hi all,
>>
>> Beside http://www.rubygarden.org/ruby?RubyW...
>> is there any tutorial to help me really install ruby on linux without
>> root access.
>> I am trying to installed it on hosting company where I host my website.
>
>
> What sort of access do you have? telnet? ssh? ftp?
>
> I've had success compiling Ruby (including running autoconf) on a
> remote hosting site where all I had was ftp and http access; I wrote
> perl and php scripts, called them through a Web page, and ended up
> with ruby installed under my home dir.
>
> Life got better after that.
>
>
>
> James
>
>
>
I have fpt,ssh and of coruse http access. Do you mind share your way to us.

regards
Eko



Eko Budi Setiyo

2/17/2005 3:24:00 AM

0

James Britt wrote:

> Eko Budi Setiyo wrote:
>
>> Hi all,
>>
>> Beside http://www.rubygarden.org/ruby?RubyW...
>> is there any tutorial to help me really install ruby on linux without
>> root access.
>> I am trying to installed it on hosting company where I host my website.
>
>
> What sort of access do you have? telnet? ssh? ftp?
>
> I've had success compiling Ruby (including running autoconf) on a
> remote hosting site where all I had was ftp and http access; I wrote
> perl and php scripts, called them through a Web page, and ended up
> with ruby installed under my home dir.
>
> Life got better after that.
>
>
>
> James
>
>
>
One more, I don't use Perly, but PHP is my other language beside Ruby.
The hosting already installe ruby 1.65 but the said they don't support
ruby 1.8x currently. So I need to do it my self.

regards
Eko



James Britt

2/17/2005 5:08:00 AM

0

Eko Budi Setiyo wrote:
> James Britt wrote:
>
>> Eko Budi Setiyo wrote:
>>
>>> Hi all,
>>>
>>> Beside http://www.rubygarden.org/ruby?RubyW...
>>> is there any tutorial to help me really install ruby on linux without
>>> root access.
>>> I am trying to installed it on hosting company where I host my website.
>>
>>
>>
>> What sort of access do you have? telnet? ssh? ftp?
>>
>> I've had success compiling Ruby (including running autoconf) on a
>> remote hosting site where all I had was ftp and http access; I wrote
>> perl and php scripts, called them through a Web page, and ended up
>> with ruby installed under my home dir.
>>
>> Life got better after that.
>>
>>
>>
>> James
>>
>>
>>
> I have fpt,ssh and of coruse http access. Do you mind share your way to us.


If you have ssh, you're in like Flynn.

The only trick is that you have to tell ./configure to install the
binaries into your home dir (--prefix=$HOME/ruby or something like that).


For those with only ftp/http (as I've been asked this before)



FTP up the ruby tarball and some perl/php scripts.

The perl/php needs to call system() or exec() or whatever it is called
to shell out and:

Extract the tarball to a nice home
run ./configure in the ruby source dir
run make
run make test
run make install


Very important: the call to 'configure' *must* pass the config options
to put the binaries under $HOME/ruby or something similar. Otherwise
it tries to go to /usr/local/ and that will fail. (I don't have a 'nix
system handy to tell you exactly what these are. I think its
--prefix=$HOME/ruby or some such thing. Run ./configure --help to be
sure. Or Google for it.)

Tip for the Perl code: use carp, which is a lib for getting nice CGI
errors logged for you. It can be tricky to get each step right, and
tracking down goofy CGI and syntax errors can get annoying.

Code will probably need to either cd to the installation dir before
running specific commands, or make all system calls using full paths.
You also have to check what permissions are set on files. You may end
up with files owned by www or apache or something, so have the perl/php
code call chmod and chown along the way.

Sorry the details are so vague; I did this about 4 years ago and never
really kept track of the scripts I wrote to do this. But either perl
or PHP will do, as they both allow shell calls and writing messages back
to the browser. They're pretty useful for stuff like that.

If you want to be clever you could probably just write a form that takes
a string and executes it via a system() call. Then just pass in each
command you need.

Just don't name it index.php.

And your Ruby code will need to use the correct path (i.e. not
/usr/local/bin/ruby) to your ruby binaries once you are up and running.

James




Eko Budi Setiyo

2/17/2005 5:51:00 AM

0

James Britt wrote:

> Eko Budi Setiyo wrote:
>
>> James Britt wrote:
>>
>>> Eko Budi Setiyo wrote:
>>>
>>>> Hi all,
>>>>
>>>> Beside http://www.rubygarden.org/ruby?RubyW...
>>>> is there any tutorial to help me really install ruby on linux
>>>> without root access.
>>>> I am trying to installed it on hosting company where I host my
>>>> website.
>>>
>>>
>>>
>>>
>>> What sort of access do you have? telnet? ssh? ftp?
>>>
>>> I've had success compiling Ruby (including running autoconf) on a
>>> remote hosting site where all I had was ftp and http access; I wrote
>>> perl and php scripts, called them through a Web page, and ended up
>>> with ruby installed under my home dir.
>>>
>>> Life got better after that.
>>>
>>>
>>>
>>> James
>>>
>>>
>>>
>> I have fpt,ssh and of coruse http access. Do you mind share your way
>> to us.
>
>
>
> If you have ssh, you're in like Flynn.
>
> The only trick is that you have to tell ./configure to install the
> binaries into your home dir (--prefix=$HOME/ruby or something like that).
>

I tried, but get the following error
----------------------------------------------------------------------------------------------------------
[ekobudi@spruce ruby-1.8.2]$ configure --prefix=/home/ekobudi/stow/ruby
bash: configure: command not found
[ekobudi@spruce ruby-1.8.2]$ ./configure --prefix=/home/ekobudi/stow/ruby
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C
compiler cannot create executables
See `config.log' for more details.
[ekobudi@spruce ruby-1.8.2]$
---------------------------------------------------------------------------------------------------------

any idea what should I do.

regards
Eko

>
> For those with only ftp/http (as I've been asked this before)
>
>
>
> FTP up the ruby tarball and some perl/php scripts.
>
> The perl/php needs to call system() or exec() or whatever it is called
> to shell out and:
>
> Extract the tarball to a nice home
> run ./configure in the ruby source dir
> run make
> run make test
> run make install
>
>
> Very important: the call to 'configure' *must* pass the config
> options to put the binaries under $HOME/ruby or something similar.
> Otherwise it tries to go to /usr/local/ and that will fail. (I don't
> have a 'nix system handy to tell you exactly what these are. I think
> its --prefix=$HOME/ruby or some such thing. Run ./configure --help
> to be sure. Or Google for it.)
>
> Tip for the Perl code: use carp, which is a lib for getting nice CGI
> errors logged for you. It can be tricky to get each step right, and
> tracking down goofy CGI and syntax errors can get annoying.
>
> Code will probably need to either cd to the installation dir before
> running specific commands, or make all system calls using full paths.
> You also have to check what permissions are set on files. You may end
> up with files owned by www or apache or something, so have the
> perl/php code call chmod and chown along the way.
>
> Sorry the details are so vague; I did this about 4 years ago and never
> really kept track of the scripts I wrote to do this. But either perl
> or PHP will do, as they both allow shell calls and writing messages
> back to the browser. They're pretty useful for stuff like that.
>
> If you want to be clever you could probably just write a form that
> takes a string and executes it via a system() call. Then just pass in
> each command you need.
>
> Just don't name it index.php.
>
> And your Ruby code will need to use the correct path (i.e. not
> /usr/local/bin/ruby) to your ruby binaries once you are up and running.
>
> James
>
>
>
>
>




Mark Probert

2/17/2005 6:31:00 AM

0

Hi ..

On Wednesday 16 February 2005 18:11, Eko Budi Setiyo wrote:
> Hi all,
>
> Beside http://www.rubygarden.org/ruby?RubyW...
> is there any tutorial to help me really install ruby on linux without
> root access.
> I am trying to installed it on hosting company where I host my website.
>

So, this is pretty straight forward:

1. get the tar ball (ruby-1.8.2.tar.gz)

2. unbundle it ($ tar zxf ruby-1.8.2.tar.gz)

3. run configure using --prefix

$ ./configure --prefix=/my/dest/dir

4. make

5. make install

And you are done. There are three directories under /my/dest/dir

bin -- add this to your path
lib
etc

then test it with

$ rehash (assuming the shell)
$ which ruby
$ ruby -v

I hope this helps.

Regards,

--
-mark. (probertm at acm dot org)


Eko Budi Setiyo

2/17/2005 6:55:00 AM

0

Mark Probert wrote:

>Hi ..
>
> On Wednesday 16 February 2005 18:11, Eko Budi Setiyo wrote:
>
>
>>Hi all,
>>
>>Beside http://www.rubygarden.org/ruby?RubyW...
>>is there any tutorial to help me really install ruby on linux without
>>root access.
>>I am trying to installed it on hosting company where I host my website.
>>
>>
>>
>
>So, this is pretty straight forward:
>
>1. get the tar ball (ruby-1.8.2.tar.gz)
>
>2. unbundle it ($ tar zxf ruby-1.8.2.tar.gz)
>
>3. run configure using --prefix
>
> $ ./configure --prefix=/my/dest/dir
>
>4. make
>
>5. make install
>
>And you are done. There are three directories under /my/dest/dir
>
> bin -- add this to your path
> lib
> etc
>
>then test it with
>
> $ rehash (assuming the shell)
> $ which ruby
> $ ruby -v
>
>I hope this helps.
>
>Regards,
>
>
>
I get error on step 3

Here is the errror
################################################################################
[ekobudi@spruce ruby-1.8.2]$ ./configure --prefix=/home/ekobudi/stow/ruby
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C
compiler cannot create executables
See `config.log' for more details.
[ekobudi@spruce ruby-1.8.2]$



Gennady

2/17/2005 7:06:00 AM

0

It may be so that your provider has the filesystem where your home
reside mounted with noexec option. You can check it by creating a
simple shell script in your home and trying chmod a+x on it. If it does
not make the script executable, then you are doomed. Potentially, you
could try their /tmp directory if it allows executable files and if it
does, build ruby there by something like:

$ mkdir /tmp/dir_for_ruby_build

$ cd /tmp/dir_for_ruby_build
$ ${HOME}/dir_with_ruby_source/configure --prefix ${HOME}/ruby
...
$ make
...
$ make install

In this case you will have to create a launcher script, say ruby.sh,
that you will call with "sh ruby.sh". It will copy
${HOME}/ruby/bin/ruby to /tmp, chmod a+x on it and then exec.

Gennady.

On Feb 16, 2005, at 9:51 PM, Eko Budi Setiyo wrote:

> James Britt wrote:
>
>> Eko Budi Setiyo wrote:
>>
>>> James Britt wrote:
>>>
>>>> Eko Budi Setiyo wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Beside http://www.rubygarden.org/ruby?RubyW...
>>>>> is there any tutorial to help me really install ruby on linux
>>>>> without root access.
>>>>> I am trying to installed it on hosting company where I host my
>>>>> website.
>>>>
>>>>
>>>>
>>>>
>>>> What sort of access do you have? telnet? ssh? ftp?
>>>>
>>>> I've had success compiling Ruby (including running autoconf) on a
>>>> remote hosting site where all I had was ftp and http access; I
>>>> wrote perl and php scripts, called them through a Web page, and
>>>> ended up with ruby installed under my home dir.
>>>>
>>>> Life got better after that.
>>>>
>>>>
>>>>
>>>> James
>>>>
>>>>
>>>>
>>> I have fpt,ssh and of coruse http access. Do you mind share your way
>>> to us.
>>
>>
>>
>> If you have ssh, you're in like Flynn.
>>
>> The only trick is that you have to tell ./configure to install the
>> binaries into your home dir (--prefix=$HOME/ruby or something like
>> that).
>>
>
> I tried, but get the following error
> -----------------------------------------------------------------------
> -----------------------------------
> [ekobudi@spruce ruby-1.8.2]$ configure --prefix=/home/ekobudi/stow/ruby
> bash: configure: command not found
> [ekobudi@spruce ruby-1.8.2]$ ./configure
> --prefix=/home/ekobudi/stow/ruby
> checking build system type... i686-pc-linux-gnu
> checking host system type... i686-pc-linux-gnu
> checking target system type... i686-pc-linux-gnu
> checking for gcc... gcc
> checking for C compiler default output file name... configure: error:
> C compiler cannot create executables
> See `config.log' for more details.
> [ekobudi@spruce ruby-1.8.2]$
> -----------------------------------------------------------------------
> ----------------------------------
>
> any idea what should I do.
>
> regards
> Eko
>
>>
>> For those with only ftp/http (as I've been asked this before)
>>
>>
>>
>> FTP up the ruby tarball and some perl/php scripts.
>>
>> The perl/php needs to call system() or exec() or whatever it is
>> called to shell out and:
>>
>> Extract the tarball to a nice home
>> run ./configure in the ruby source dir
>> run make
>> run make test
>> run make install
>>
>>
>> Very important: the call to 'configure' *must* pass the config
>> options to put the binaries under $HOME/ruby or something similar.
>> Otherwise it tries to go to /usr/local/ and that will fail. (I don't
>> have a 'nix system handy to tell you exactly what these are. I think
>> its --prefix=$HOME/ruby or some such thing. Run ./configure --help
>> to be sure. Or Google for it.)
>>
>> Tip for the Perl code: use carp, which is a lib for getting nice CGI
>> errors logged for you. It can be tricky to get each step right, and
>> tracking down goofy CGI and syntax errors can get annoying.
>>
>> Code will probably need to either cd to the installation dir before
>> running specific commands, or make all system calls using full paths.
>> You also have to check what permissions are set on files. You may
>> end up with files owned by www or apache or something, so have the
>> perl/php code call chmod and chown along the way.
>>
>> Sorry the details are so vague; I did this about 4 years ago and
>> never really kept track of the scripts I wrote to do this. But
>> either perl or PHP will do, as they both allow shell calls and
>> writing messages back to the browser. They're pretty useful for
>> stuff like that.
>>
>> If you want to be clever you could probably just write a form that
>> takes a string and executes it via a system() call. Then just pass
>> in each command you need.
>>
>> Just don't name it index.php.
>>
>> And your Ruby code will need to use the correct path (i.e. not
>> /usr/local/bin/ruby) to your ruby binaries once you are up and
>> running.
>>
>> James
>>
>>
>>
>>
>>
>
>
>
>

Sincerely,
Gennady Bystritsky



martinus

2/17/2005 9:23:00 AM

0

> compiler cannot create executables

I guess you cannot do anything about this, thats a limitation enforced
by your provider. Either the provider allows excutables, switches to
ruby 1.8.x, or you switch the provider...

martinus

Alexander Kellett

2/17/2005 9:52:00 AM

0

On Feb 17, 2005, at 7:54 AM, Eko Budi Setiyo wrote:
> Here is the errror
> #######################################################################
> #########
> [ekobudi@spruce ruby-1.8.2]$ ./configure
> --prefix=/home/ekobudi/stow/ruby
> checking build system type... i686-pc-linux-gnu
> checking host system type... i686-pc-linux-gnu
> checking target system type... i686-pc-linux-gnu
> checking for gcc... gcc
> checking for C compiler default output file name... configure: error:
> C compiler cannot create executables
> See `config.log' for more details.
> [ekobudi@spruce ruby-1.8.2]$

find out what the providers running. install it. build. copy.

Alex