Ruby is not accessible from the my terminal

My Ubuntu Software Center shows Ruby 1.8 “Installed” but Ruby is not
accessible from the my terminal:

$ ruby -v
The program 'ruby' is currently not installed. You can install it by
typing:
sudo apt-get install ruby
$ printenv PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/wolf/.gem/ruby/1.8/bin
$ cucumber codebreaker_starts_game.feature
Feature: code-breaker starts game

Cucumber is a Ruby framework. Cucumber is working but Ruby does not.
How is that possible? How can I run Ruby from my terminal?

Thank you.

···

--
Posted via http://www.ruby-forum.com/.

On Mon, Feb 14, 2011 at 12:26 AM, wolf volpi

$ printenv PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/wolf/.gem/ruby/1.8/bin
$ cucumber codebreaker_starts_game.feature
Feature: code-breaker starts game

Cucumber is a Ruby framework. Cucumber is working but Ruby does not.
How is that possible? How can I run Ruby from my terminal?

View the cucumber source (`which cucumber` will tell you where it is)
and see how it's invoking ruby.

martin

Martin DeMello wrote in post #981436:

On Mon, Feb 14, 2011 at 12:26 AM, wolf volpi

$ printenv PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/wolf/.gem/ruby/1.8/bin

$ cucumber codebreaker_starts_game.feature
Feature: code-breaker starts game

Cucumber is a Ruby framework. Cucumber is working but Ruby does not.
How is that possible? How can I run Ruby from my terminal?

View the cucumber source (`which cucumber` will tell you where it is)
and see how it's invoking ruby.

martin

$ which cucumber
/home/wolf/.gem/ruby/1.8/bin/cucumber

Thanks martin. Now where do I go from here?

···

--
Posted via http://www.ruby-forum.com/\.

$ head /home/wolf/.gem/ruby/1.8/bin/cucumber

It should have a first line of the form

#!/usr/bin/ruby

which will tell you where exactly cucumber is running ruby from.

martin

···

On Mon, Feb 14, 2011 at 12:48 AM, wolf volpi <wolf_volpi@yahoo.com> wrote:

$ which cucumber
/home/wolf/.gem/ruby/1.8/bin/cucumber

Thanks martin. Now where do I go from here?

Martin DeMello wrote in post #981441:

It should have a first line of the form

#!/usr/bin/ruby

which will tell you where exactly cucumber is running ruby from.

martin

Yeh, it works!

$ head /home/wolf/.gem/ruby/1.8/bin/cucumber
#!/usr/bin/ruby1.8
$ /usr/bin/ruby1.8 -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]

Now I try interactive ruby as described in
http://www.ruby-lang.org/en/documentation/quickstart/

$ irb
The program 'irb' is currently not installed. You can install it by
typing:
sudo apt-get install irb

But my Ubuntu Software Center shows irb 1.8 “Installed”. How can I get
irb to run?

Is Ruby usually this difficult to setup on Ubuntu? Are there some magic
instructions I missed?

Thank you.

···

--
Posted via http://www.ruby-forum.com/\.

You have the ruby18 and irb18 packages installed, but not ruby and irb
(which install links to these names)

Try:
sudo apt-get install ruby irb

- which is of course exactly what Ubuntu was telling you to do.

(I am assuming this is ubuntu 10.04; it's changed for 10.10, there is
thankfully less fragmentation of the ruby packages)

···

--
Posted via http://www.ruby-forum.com/.

Brian Candler wrote in post #981455:

You have the ruby18 and irb18 packages installed, but not ruby and irb
(which install links to these names)

Try:
sudo apt-get install ruby irb

- which is of course exactly what Ubuntu was telling you to do.

(I am assuming this is ubuntu 10.04; it's changed for 10.10, there is
thankfully less fragmentation of the ruby packages)

Brian,

irb worked after "sudo apt-get install ruby irb".
And yes, I am using Ubuntu 10.04.

Thank you for your assistance.

···

--
Posted via http://www.ruby-forum.com/\.