Forum: Ruby Newbie Question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
87f83a47ce04e7661ec3c9dfc33b35bc?d=identicon&s=25 Rafael George (Guest)
on 2007-06-08 17:23
(Received via mailing list)
Hi guys, im trying an script that use Mongrel and Erubis, i just
installed the gems with
gem install mongrel
gem install erubis

The installation went fine, without any error but everytime i try to
run the script i get this message error,

`require': no such file to load -- erubis (LoadError)

It's obvious that the script is not finding the previously installed
gem, im using Ubuntu i installed rails using the .deb package in the
repository and it works fine too, when i checked where was rails
installed it is in the same path where rubygem installed the gems.

So i really don't know where to check. Can somebody assist me with this.

Thanks
E3c79c779c0b390049289cdfe7cb9705?d=identicon&s=25 Bob Hutchison (Guest)
on 2007-06-08 17:41
(Received via mailing list)
Hi,

On 8-Jun-07, at 11:22 AM, Rafael George wrote:

> Hi guys, im trying an script that use Mongrel and Erubis, i just
> installed the gems with
> gem install mongrel
> gem install erubis
>
> The installation went fine, without any error but everytime i try to
> run the script i get this message error,
>
> `require': no such file to load -- erubis (LoadError)

I think you likely are not telling Ruby that you are using gems.
Either define the environment variable:

export RUBYOPT=-rubygems

(for bash, some shells do this differently)

in your shell, or add '-rubygems' to the command line when starting
ruby.

There might be other ways, but I don't know them.

You can test this by running irb and trying to require erubis.

Cheers,
Bob

>
> --
> Grimoire Guru
> SourceMage GNU/Linux
>

----
Bob Hutchison                  -- tumblelog at <http://
www.recursive.ca/so/>
Recursive Design Inc.          -- weblog at <http://www.recursive.ca/
hutch>
                                -- works at <http://www.recursive.ca/>
87f83a47ce04e7661ec3c9dfc33b35bc?d=identicon&s=25 Rafael George (Guest)
on 2007-06-08 17:53
(Received via mailing list)
Thanks
96931bfe0c2948f47a98e15ae52e5637?d=identicon&s=25 Chris Carter (cdcarter)
on 2007-06-08 19:09
(Received via mailing list)
> There might be other ways, but I don't know them.
>
> You can test this by running irb and trying to require erubis.

you can also just
require 'rubygems'
This topic is locked and can not be replied to.