On 2013-06-23, at 5:28 PM, "Michael P F." <lists / ruby-forum.com> wrote:

> I get the following error message in Ubuntu Terminal
>=20
> michael@michael-desktop:~/Desktop$ ruby<weins.txt
> /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot=20=

> load such file -- highline/import (LoadError)
>  from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
>  from -:4:in `<main>'
> michael@michael-desktop:~/Desktop$ ^C
> michael@michael-desktop:~/Desktop$
>=20
> Thanks for the effort, anyway
>=20
>   Mike Finerty
>=20
> --=20
> Posted via http://www.ruby-forum.com/.

That means you don't have the highline gem installed, it is a little =
more verbose if you don't use that, we have to check for the input being =
exhausted and for input which can't be turned into a Float so maybe:

#!/usr/bin/env ruby

CONST =3D 28977682.9

catch (:done) do
  loop  do
    print "Enter number: "
    throw :done unless response =3D gets

    if num =3D Float(response) rescue nil
      puts CONST / num
    else
      puts "enter a number please."
    end
  end
end

puts "Bye!"

__END__           =20

Hope this helps,

Mike


--=20

Mike Stok <mike / stok.ca>
http://www.stok.ca/~mike/

The "`Stok' disclaimers" apply.