Ruby is not accessible from the my terminal

W

wolf volpi

My Ubuntu Software Center shows Ruby 1.8 =E2=80=9CInstalled=E2=80=9D 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/.=
 
M

Martin DeMello

$ 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. =A0Cucumber is working but Ruby does not.
How is that possible? =A0How 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
 
W

wolf volpi

Martin DeMello wrote in post #981436:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/wolf/.gem/ruby/1.8/bin

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?
 
M

Martin DeMello

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

Thanks martin. =A0Now where do I go from here?

$ 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
 
W

wolf volpi

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 =E2=80=9CInstalled=E2=80=9D. =
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/.=
 
B

Brian Candler

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)
 
W

wolf volpi

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top