How can I compile and run downloaded source code using these tools?
My preferred solution on a Mac is to use Homebrew Redirecting... and install Apple's free Xcode tools (with the command line tools). Those give you compilers and the ability to build and install other programs.
Mike
···
On 2013-06-22, at 11:43 AM, Chamila W. <lists@ruby-forum.com> wrote:
On 2013-06-22, at 11:13 AM, "Chamila W." <lists@ruby-forum.com> wrote:
Subject: Re: Getting Started With Development
Date: mer 12 giu 13 11:03:35 +0900
Quoting Chamila W. (lists@ruby-forum.com):
But it gives errors for new features in Ruby 2.0 that was not in early
versions like "p %i{hurray huzzah whoop}".
What do you mean by new interpreter is ready? I want to check some new
features in Ruby 2.0. i followed steps you suggested. I can't understand
if I'm getting results from ruby I installed using apt-get or using ruby
I build using source code.
···
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.
What do you mean by new interpreter is ready? I want to check some new
features in Ruby 2.0. i followed steps you suggested. I can't understand
if I'm getting results from ruby I installed using apt-get or using ruby
I build using source code.
I mean that the interpreter in /usr/bin (the one installed by
debian/ubuntu) is not used if there is one in /usr/local/bin
(installed by you). This is because, at least in default settings,
/usr/local/bin appears before /usr/bin in PATH.
If you want to be sure that you are not using the old interpreter,
after you have done make install, remove the ubuntu package, as I
already mentioned in a previous msg.
In all cases, you may know what you are running by typing
ruby -v
Another command you may use is
which ruby
which prints out the path of the first executable with the name 'ruby'
found in your PATH. If you type
ls -l `which ruby`
you can see if the executable you run is recent or not.
Carlo
···
Subject: Re: Getting Started With Development
Date: gio 13 giu 13 12:08:36 +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)
I saved project I downloaded at /home/chamila/ruby/rr/ruby and compiled
it. Should I do that at /usr/local/bin ?
I mean that the interpreter in /usr/bin (the one installed by
debian/ubuntu) is not used if there is one in /usr/local/bin
(installed by you). This is because, at least in default settings,
/usr/local/bin appears before /usr/bin in PATH.
If you want to be sure that you are not using the old interpreter,
after you have done make install, remove the ubuntu package, as I
already mentioned in a previous msg.
In all cases, you may know what you are running by typing
when I tried ruby -v it gives the output as ruby 1.8.7.
which ruby gives output /usr/local/bin/ruby.
But when I run RUBY_VERSION in irb it gave 2.1.0 and irb successfully
execute p %i{hurray huzzah whoop} which I couldn't executed using ruby.
···
ruby -v
Another command you may use is
which ruby
which prints out the path of the first executable with the name 'ruby'
found in your PATH. If you type
ls -l `which ruby`
you can see if the executable you run is recent or not.