# Ruby Bootstrap

**URL:** <https://rubytalk.org/t/ruby-bootstrap/37930>\
**Category:** ruby-talk\
**Created:** [29 May 2007 08:38 UTC](https://rubytalk.org/t/ruby-bootstrap/37930 "2007-05-29T08:38:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leslie\_Viljoen1](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@Leslie\_Viljoen1](https://rubytalk.org/u/Leslie_Viljoen1)\
**Post date:** [29 May 2007 08:38 UTC](https://rubytalk.org/t/ruby-bootstrap/37930/1 "2007-05-29T08:38:20Z")

</div>

Hi people

Where does Ruby get its initial $LOAD\_PATH?

Where is its startup file? ie. what script loads these:

> > $LOADED\_FEATURES

=\> ["e2mmap.rb", "irb/init.rb", "irb/workspace.rb", "irb/context.rb",  
"irb/extend-command.rb", "irb/output-method.rb", "irb/notifier.rb",  
"irb/slex.rb", "irb/ruby-token.rb", "irb/ruby-lex.rb", "readline.so",  
"irb/input-method.rb", "irb/locale.rb", "irb.rb", "irb/completion.rb", "  
rbconfig.rb", "rubygems/rubygems\_version.rb", "thread.rb",  
"rbconfig/datadir.rb", "rubygems/user\_interaction.rb", "socket.so", "  
timeout.rb", "net/protocol.rb", "uri/common.rb", "uri/generic.rb",  
"uri/ftp.rb", "uri/http.rb", "uri/https.rb", "uri/ldap.rb", "uri/mailto.rb",  
"uri.rb", "net/http.rb", "stringio.so", "yaml/error.rb", "syck.so",  
"yaml/ypath.rb", "yaml/basenode.rb", "yaml/syck.rb", "yaml/tag.rb",  
"yaml/stream.rb", "yaml/constants.rb", "rational.rb", "date/format.rb", "  
date.rb", "yaml/rubytypes.rb", "yaml/types.rb", "yaml.rb", "zlib.so",  
"rubygems/remote\_fetcher.rb", "digest.so", "digest/sha2.so",  
"rubygems/digest/digest\_adapter.rb", "rubygems/digest/sha2.rb", "  
forwardable.rb", "parsedate.rb", "time.rb", "rubygems/source\_index.rb",  
"rubygems/version.rb", "rubygems/specification.rb", "openssl.so",  
"openssl/bn.rb", "openssl/cipher.rb", "openssl/digest.rb",  
"openssl/buffering.rb", "fcntl.so", "openssl/ssl.rb", "openssl/x509.rb", "  
openssl.rb", "rubygems/gem\_openssl.rb", "rubygems/security.rb",  
"rubygems/custom\_require.rb", "rubygems.rb", "ostruct.rb", "wirble.rb", "  
prettyprint.rb", "pp.rb"]

Thanks,  
Les

> **···**
>
> --  
> If you could create a machine that copies hamburgers — you put one hamburger  
> in and two equally good hamburgers come out the other side — it would be  
> unethical not to do so and make it freely available.

---

<div class="post-metadata">

**Author:** ![David\_A\_Black3](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@David\_A\_Black3](https://rubytalk.org/u/David_A_Black3)\
**Post date:** [29 May 2007 09:26 UTC](https://rubytalk.org/t/ruby-bootstrap/37930/2 "2007-05-29T09:26:53Z")

</div>

Hi --

> Hi people
> 
> Where does Ruby get its initial $LOAD\_PATH?

I believe it's compiled into the Ruby executable.

> Where is its startup file? ie. what script loads these:
> 
> > > $LOADED\_FEATURES
> 
> =\> ["e2mmap.rb", "irb/init.rb", "irb/workspace.rb", "irb/context.rb",  
> "irb/extend-command.rb", "irb/output-method.rb", "irb/notifier.rb",  
> "irb/slex.rb", "irb/ruby-token.rb", "irb/ruby-lex.rb", "readline.so",

$LOADED\_FEATURES gets added to dynamically as you require/load things  
at runtime.

David

> **···**
>
> On Tue, 29 May 2007, Leslie Viljoen wrote:
> 
> --  
> Q. What is THE Ruby book for Rails developers?  
> A. RUBY FOR RAILS by David A. Black ([http://www.manning.com/black\](http://www.manning.com/black%5C))  
> &nbsp;&nbsp;&nbsp;&nbsp;(See what readers are saying! [http://www.rubypal.com/r4rrevs.pdf\](http://www.rubypal.com/r4rrevs.pdf%5C))  
> Q. Where can I get Ruby/Rails on-site training, consulting, coaching?  
> A. Ruby Power and Light, LLC ([http://www.rubypal.com](http://www.rubypal.com))

---

<div class="post-metadata">

**Author:** ![Brian\_Candler](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Brian\_Candler](https://rubytalk.org/u/Brian_Candler)\
**Post date:** [29 May 2007 10:52 UTC](https://rubytalk.org/t/ruby-bootstrap/37930/3 "2007-05-29T10:52:24Z")

</div>

> Where is its startup file? ie. what script loads these:
> 
> \>\>$LOADED\_FEATURES

Whatever you typed to get the "\>\>" prompt.

> =\> ["e2mmap.rb", "irb/init.rb", "irb/workspace.rb", "irb/context.rb",  
> "irb/extend-command.rb", "irb/output-method.rb", "irb/notifier.rb",  
> "irb/slex.rb", "irb/ruby-token.rb", "irb/ruby-lex.rb", "readline.so",  
> "irb/input-method.rb", "irb/locale.rb", "irb.rb", "irb/completion.rb", "  
> rbconfig.rb", "rubygems/rubygems\_version.rb", "thread.rb",  
> "rbconfig/datadir.rb", "rubygems/user\_interaction.rb", "socket.so", "  
> timeout.rb", "net/protocol.rb", "uri/common.rb", "uri/generic.rb",  
> "uri/ftp.rb", "uri/http.rb", "uri/https.rb", "uri/ldap.rb", "uri/mailto.rb",  
> "uri.rb", "net/http.rb", "stringio.so", "yaml/error.rb", "syck.so",  
> "yaml/ypath.rb", "yaml/basenode.rb", "yaml/syck.rb", "yaml/tag.rb",  
> "yaml/stream.rb", "yaml/constants.rb", "rational.rb", "date/format.rb", "  
> date.rb", "yaml/rubytypes.rb", "yaml/types.rb", "yaml.rb", "zlib.so",  
> "rubygems/remote\_fetcher.rb", "digest.so", "digest/sha2.so",  
> "rubygems/digest/digest\_adapter.rb", "rubygems/digest/sha2.rb", "  
> forwardable.rb", "parsedate.rb", "time.rb", "rubygems/source\_index.rb",  
> "rubygems/version.rb", "rubygems/specification.rb", "openssl.so",  
> "openssl/bn.rb", "openssl/cipher.rb", "openssl/digest.rb",  
> "openssl/buffering.rb", "fcntl.so", "openssl/ssl.rb", "openssl/x509.rb", "  
> openssl.rb", "rubygems/gem\_openssl.rb", "rubygems/security.rb",  
> "rubygems/custom\_require.rb", "rubygems.rb", "ostruct.rb", "wirble.rb", "  
> prettyprint.rb", "pp.rb"]

Looking at this huge list of things, I'm not sure what you ran. It's not big  
enough to be rails script/console, but is too big to be plain old irb:

$ irb1.8  
irb(main):001:0\> $LOADED\_FEATURES  
=\> ["irb.rb", "e2mmap.rb", "irb/init.rb", "irb/context.rb",  
"irb/workspace.rb", "irb/extend-command.rb", "irb/ruby-lex.rb",  
"irb/slex.rb", "irb/notifier.rb", "irb/output-method.rb",  
"irb/ruby-token.rb", "irb/input-method.rb", "readline.so", "irb/locale.rb"]  
irb(main):002:0\>

If you try just Ruby by itself, you'll find nothing is loaded by default.

$ ruby1.8 -e 'p $LOADED\_FEATURES'

HTH,

Brian.

> **···**
>
> On Tue, May 29, 2007 at 05:38:20PM +0900, Leslie Viljoen wrote:

---

<div class="post-metadata">

**Author:** ![Leslie\_Viljoen1](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@Leslie\_Viljoen1](https://rubytalk.org/u/Leslie_Viljoen1)\
**Post date:** [29 May 2007 14:49 UTC](https://rubytalk.org/t/ruby-bootstrap/37930/4 "2007-05-29T14:49:48Z")

</div>

> \> Where is its startup file? ie. what script loads these:  
> \>  
> \> \>\>$LOADED\_FEATURES
> 
> Whatever you typed to get the "\>\>" prompt.
> 
> \> =\> ["e2mmap.rb", "irb/init.rb", "irb/workspace.rb", "irb/context.rb",  
> \> "irb/extend-command.rb", "irb/output-method.rb", "irb/notifier.rb",  
> \> "irb/slex.rb", "irb/ruby-token.rb", "irb/ruby-lex.rb", "readline.so",  
> \> "irb/input-method.rb", "irb/locale.rb", "irb.rb", "irb/completion.rb", "  
> \> rbconfig.rb", "rubygems/rubygems\_version.rb", "thread.rb",  
> \> "rbconfig/datadir.rb", "rubygems/user\_interaction.rb", "socket.so", "  
> \> timeout.rb", "net/protocol.rb", "uri/common.rb", "uri/generic.rb",  
> \> "uri/ftp.rb", "uri/http.rb", "uri/https.rb", "uri/ldap.rb",  
> "uri/mailto.rb",  
> \> "uri.rb", "net/http.rb", "stringio.so", "yaml/error.rb", "syck.so",  
> \> "yaml/ypath.rb", "yaml/basenode.rb", "yaml/syck.rb", "yaml/tag.rb",  
> \> "yaml/stream.rb", "yaml/constants.rb", "rational.rb", "date/format.rb",  
> "  
> \> date.rb", "yaml/rubytypes.rb", "yaml/types.rb", "yaml.rb", "zlib.so",  
> \> "rubygems/remote\_fetcher.rb", "digest.so", "digest/sha2.so",  
> \> "rubygems/digest/digest\_adapter.rb", "rubygems/digest/sha2.rb", "  
> \> forwardable.rb", "parsedate.rb", "time.rb", "rubygems/source\_index.rb",  
> \> "rubygems/version.rb", "rubygems/specification.rb", "openssl.so",  
> \> "openssl/bn.rb", "openssl/cipher.rb", "openssl/digest.rb",  
> \> "openssl/buffering.rb", "fcntl.so", "openssl/ssl.rb", "openssl/x509.rb",  
> "  
> \> openssl.rb", "rubygems/gem\_openssl.rb", "rubygems/security.rb",  
> \> "rubygems/custom\_require.rb", "rubygems.rb", "ostruct.rb", "wirble.rb",  
> "  
> \> prettyprint.rb", "pp.rb"]
> 
> Looking at this huge list of things, I'm not sure what you ran. It's not  
> big  
> enough to be rails script/console, but is too big to be plain old irb:
> 
> $ irb1.8  
> irb(main):001:0\> $LOADED\_FEATURES  
> =\> ["irb.rb", "e2mmap.rb", "irb/init.rb", "irb/context.rb",  
> "irb/workspace.rb", "irb/extend-command.rb", "irb/ruby-lex.rb",  
> "irb/slex.rb", "irb/notifier.rb", "irb/output-method.rb",  
> "irb/ruby-token.rb", "irb/input-method.rb", "readline.so",  
> "irb/locale.rb"]  
> irb(main):002:0\>

It WAS irb on my Linux system. I have syntax highlighting and tab completion  
turned on though.

If you try just Ruby by itself, you'll find nothing is loaded by default.

> **···**
>
> On 5/29/07, Brian Candler \<B.Candler@pobox.com\> wrote:
> 
> > On Tue, May 29, 2007 at 05:38:20PM +0900, Leslie Viljoen wrote:
> > 
> > $ ruby1.8 -e 'p $LOADED\_FEATURES'
> > 
> > HTH,
> > 
> > Brian.
> 
> --  
> If you could create a machine that copies hamburgers — you put one hamburger  
> in and two equally good hamburgers come out the other side — it would be  
> unethical not to do so and make it freely available.
