I'm new to Ruby Development. I downloaded source from Github, but couldn't
build it. Can somebody tell me where I can download a ruby-lang source that
can be compiled and run. How should I compile and run it on Linux?
···
--
*Chamila Dilshan Wijayarathna,*
SMIEEE, SMIESL,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.
Ruby is often installed on linux, or can be easily installed with the
package manager. Personally, I prefer to build and install from the
source, like this:
# tar xzf /opt/src/ruby-2.0.0-p195.tar.gz
# cd ruby-2.0.0-p195
# ./configure
# make
# sudo make install
# irb
irb(main):001:0> RUBY_VERSION
=> "2.0.0"
irb(main):002:0> exit
It helps if you explain how you tried to build it and why it didn't work
(what was the error?)
-Josh
···
On Tue, Jun 11, 2013 at 4:46 AM, Chamila Wijayarathna < cdwijayarathna@gmail.com> wrote:
I'm new to Ruby Development. I downloaded source from Github, but couldn't
build it. Can somebody tell me where I can download a ruby-lang source that
can be compiled and run. How should I compile and run it on Linux?
I'm new to Ruby Development. I downloaded source from Github, but couldn't build it. Can somebody tell me where I can download a ruby-lang source that can be compiled and run. How should I compile and run it on Linux?
I'd like to use RVM ( http://rvm.io ) but if you tell us which version of linux are you running and what exactly do you want to do, we might be of better assistance
--
Chamila Dilshan Wijayarathna,
SMIEEE, SMIESL,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.
On 11 Ιουν 2013, at 11:46 , Chamila Wijayarathna <cdwijayarathna@gmail.com> wrote:
--
The wise man said: "Never argue with an idiot. They bring you down to their level and beat you with experience."
Ruby is often installed on linux, or can be easily installed with the
package manager. Personally, I prefer to build and install from the
source, like this:
# tar xzf /opt/src/ruby-2.0.0-p195.tar.gz
# cd ruby-2.0.0-p195
# ./configure
I'm okay up to this point. But When I tried to run make, I'm getting
error saying "Executable host Ruby is required".
···
# make
# sudo make install
# irb
irb(main):001:0> RUBY_VERSION
=> "2.0.0"
irb(main):002:0> exit
#
I'd like to use RVM ( http://rvm.io ) but if you tell us which version
of linux are you running and what exactly do you want to do, we might be
of better assistance
Per-erik Martin wrote in post #1112021:
> Ruby is often installed on linux, or can be easily installed with the
> package manager. Personally, I prefer to build and install from the
> source, like this:
>
> # tar xzf /opt/src/ruby-2.0.0-p195.tar.gz
> # cd ruby-2.0.0-p195
> # ./configure
I'm okay up to this point. But When I tried to run make, I'm getting
error saying "Executable host Ruby is required".
Compilation of Ruby in the normal way requires a pre-existing ruby
interpreter. Maybe there is a way to compile from scratch - I do not
know. What I generally do on new machines (I use Debian) is first load
Debian's package with
apt-get install ruby
After compiling/installing (under /usr/local as default), you can do
apt-get purge ruby
and happily use your self-compiled interpreter plus utilities.
Remember to install the dev package of libreadline if you want to have
irb command history. Do that before running ./configure.
Carlo
···
Subject: Re: Getting Started With Development
Date: mer 12 giu 13 03:44:55 +0900
--
* Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
* di parlare tanto di amore e di rettitudine? (Chuang-Tzu)
Ruby is often installed on linux, or can be easily installed with the
package manager. Personally, I prefer to build and install from the
source, like this:
# tar xzf /opt/src/ruby-2.0.0-p195.tar.gz
# cd ruby-2.0.0-p195
# ./configure
I'm okay up to this point. But When I tried to run make, I'm getting
error saying "Executable host Ruby is required".
Make sure that you are using the right source tar ball. The ones you
find here: http://www.ruby-lang.org/en/
should not require a preinstalled ruby for boot strapping.
Thank you for helping.
I'm hoping to do changes to source and test them. Can I do this after
installing as you mentioned. How can I build after doing some change to
the code?
Carlo E. Prelz wrote in post #1112089:
···
Subject: Re: Getting Started With Development
Date: mer 12 giu 13 03:44:55 +0900
Quoting Chamila W. (lists@ruby-forum.com):
error saying "Executable host Ruby is required".
Compilation of Ruby in the normal way requires a pre-existing ruby
interpreter. Maybe there is a way to compile from scratch - I do not
know. What I generally do on new machines (I use Debian) is first load
Debian's package with
apt-get install ruby
After compiling/installing (under /usr/local as default), you can do
apt-get purge ruby
and happily use your self-compiled interpreter plus utilities.
Remember to install the dev package of libreadline if you want to have
irb command history. Do that before running ./configure.
I tried this also, it gives the same error "Executable host Ruby is
required".
···
Make sure that you are using the right source tar ball. The ones you
find here: Ruby Programming Language
should not require a preinstalled ruby for boot strapping.
Subject: Re: Getting Started With Development
Date: mer 12 giu 13 03:44:55 +0900
Quoting Chamila W. (lists@ruby-forum.com):
error saying "Executable host Ruby is required".
Compilation of Ruby in the normal way requires a pre-existing ruby
interpreter. Maybe there is a way to compile from scratch - I do not
know. What I generally do on new machines (I use Debian) is first load
Debian's package with
apt-get install ruby installs Ruby 1.8.7, but I need to compile Ruby
2.0.0- ,Is it okay to use Ruby 1.8.7 as executable host?
···
apt-get install ruby
After compiling/installing (under /usr/local as default), you can do
apt-get purge ruby
and happily use your self-compiled interpreter plus utilities.
Remember to install the dev package of libreadline if you want to have
irb command history. Do that before running ./configure.
Subject: Re: Getting Started With Development
Date: mer 12 giu 13 03:44:55 +0900
Quoting Chamila W. (lists@ruby-forum.com):
error saying "Executable host Ruby is required".
Compilation of Ruby in the normal way requires a pre-existing ruby
interpreter. Maybe there is a way to compile from scratch - I do not
know. What I generally do on new machines (I use Debian) is first load
Debian's package with
This works for me in Ubuntu? It works fine. Do I have to follow same
steps in MAC?
···
apt-get install ruby
After compiling/installing (under /usr/local as default), you can do
apt-get purge ruby
and happily use your self-compiled interpreter plus utilities.
Remember to install the dev package of libreadline if you want to have
irb command history. Do that before running ./configure.
Thank you for helping.
I'm hoping to do changes to source and test them. Can I do this after
installing as you mentioned. How can I build after doing some change to
the code?
Once you have a running ruby, compilation works OK. Just do a
make. Keep in mind that the first executable found is generally the
one under /usr/local/bin. Check your PATH. After you have done make
install, the last interpreter you compiled will be used for further
compilations.
If you want to see the commands that are executed during make, you can
type
make V=1
Good luck with your changes...
Carlo
···
Subject: Re: Getting Started With Development
Date: mer 12 giu 13 04:53:29 +0900
--
* Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
* di parlare tanto di amore e di rettitudine? (Chuang-Tzu)
apt-get install ruby installs Ruby 1.8.7, but I need to compile Ruby
2.0.0- ,Is it okay to use Ruby 1.8.7 as executable host?
Yes. For what needs to be done while compiling, 1.8 is enough.
Carlo
···
Subject: Re: Getting Started With Development
Date: mer 12 giu 13 10:23:40 +0900
--
* Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
* di parlare tanto di amore e di rettitudine? (Chuang-Tzu)
This works for me in Ubuntu? It works fine. Do I have to follow same
steps in MAC?
I have no idea - I have no macintosh.
Carlo
···
Subject: Re: Getting Started With Development
Date: Sun 23 Jun 13 12:13:20AM +0900
--
* Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
* di parlare tanto di amore e di rettitudine? (Chuang-Tzu)
Subject: Re: Getting Started With Development
Date: mer 12 giu 13 03:44:55 +0900
Quoting Chamila W. (lists@ruby-forum.com):
error saying "Executable host Ruby is required".
Compilation of Ruby in the normal way requires a pre-existing ruby
interpreter. Maybe there is a way to compile from scratch - I do not
know. What I generally do on new machines (I use Debian) is first load
Debian's package with
This works for me in Ubuntu? It works fine. Do I have to follow same
steps in MAC?
But it gives errors for new features in Ruby 2.0 that was not in early
versions like "p %i{hurray huzzah whoop}".
Do not worry. The interpreter is not asked to do anything like "p
%i{hurray huzzah whoop}" while compiling a new interpreter. As soon as
the new interpreter is ready, it will be used instead of the old one
for subsequent tasks.
Carlo
···
Subject: Re: Getting Started With Development
Date: mer 12 giu 13 11:03:35 +0900
--
* Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
* di parlare tanto di amore e di rettitudine? (Chuang-Tzu)