Re: [External] re: Adding a directory to LOAD_PATH

"Tran, Minh" <[email protected]> Thu, 7 Nov 2019 19:05:07 +0000
Newsgroups gmane.comp.lang.ruby.general
Message-ID <SN6PR05MB5391526F655EBE84D5A2E416EE780@SN6PR05MB5391.namprd05.prod.outlook.com>
--===============1098895472==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_SN6PR05MB5391526F655EBE84D5A2E416EE780SN6PR05MB5391namp_"

--_000_SN6PR05MB5391526F655EBE84D5A2E416EE780SN6PR05MB5391namp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Thank you so much Leam for all of the helps. It works.
Regards,
Minh

________________________________
From: ruby-talk <[email protected]> on behalf of Leam Hall <l=
[email protected]>
Sent: Thursday, November 7, 2019 1:52 PM
To: Ruby users <[email protected]>
Subject: Re: [External] re: Adding a directory to LOAD_PATH

Try putting ".." before "/vendor", do not have a space between
"expand_path" and the "(", and use File.expand_path instead of
FILE.expand_path.

This worked for me:

    ruby -e '$LOAD_PATH << File.expand_path("../lib/", __FILE__)'

Leam


On 11/7/19 1:46 PM, Tran, Minh wrote:
> I got an error message when I tried to use LOAD_PATH. I would like to
> seek your helps and expertise.
>
> Thanks!
>
> ruby -e '$LOAD_PATH << FILE.expand_path
> ("/vendor/kinectic-sdk-rb",__FILE__)'
>
> - syntax error, unexpected ( arg, expecting end-of-input
> ...LOAD_PATH << FILE.expand_path ("vendor/kinectic..
>
>
> ------------------------------------------------------------------------
> *From:* ruby-talk <[email protected]> on behalf of Leam
> Hall <[email protected]>
> *Sent:* Thursday, November 7, 2019 12:53 PM
> *To:* Ruby users <[email protected]>
> *Subject:* Re: [External] re: Adding a directory to LOAD_PATH
> Hey, since you're new to Ruby, I'll point you to one of the secrets:
> irb. It gives you a live Ruby environment to try things out. I'm new to
> Ruby too, and irb helps me learn. Here's an example:
>
> [leam@shaphan ruby]$ pwd; ls lib
> /home/leam/lang/ruby
> shot_string.rb
>
> [leam@shaphan ruby]$ irb
>
> irb(main):001:0> require 'shot_string'
> Traceback (most recent call last):
>           6: from /usr/local/bin/irb:23:in `<main>'
>           5: from /usr/local/bin/irb:23:in `load'
>           4: from
> /usr/local/lib/ruby/gems/2.7.0/gems/irb-1.1.0.pre.3/exe/irb:11:in `<top
> (required)>'
>           3: from (irb):1
>           2: from
> /usr/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:81:in
> `require'
>           1: from
> /usr/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:81:in
> `require'
> LoadError (cannot load such file -- shot_string)
>
> irb(main):002:0> $LOAD_PATH << File.expand_path("../lib/", __FILE__)
>
> =3D> ["/usr/local/lib/ruby/gems/2.7.0/gems/did_you_mean-1.3.1/lib",
> "/usr/local/lib/ruby/site_ruby/2.7.0",
> "/usr/local/lib/ruby/site_ruby/2.7.0/x86_64-linux",
> "/usr/local/lib/ruby/site_ruby",
> "/usr/local/lib/ruby/vendor_ruby/2.7.0",
> "/usr/local/lib/ruby/vendor_ruby/2.7.0/x86_64-linux",
> "/usr/local/lib/ruby/vendor_ruby", "/usr/local/lib/ruby/2.7.0",
> "/usr/local/lib/ruby/2.7.0/x86_64-linux", "/home/leam/lang/ruby/lib"]
>
> irb(main):003:0> require 'shot_string'
> =3D> true
> irb(main):004:0>
>
>
> Leam
>
>
>
>
> On 11/7/19 12:41 PM, Tran, Minh wrote:
>> Thank you so much Leam.
>> I would like to load the kinetic-sdk.rb program in
>> /vendor/kinetic-sdk-rb/  to my current working directory /my_project ;
>> so would the following command work ?
>>
>> $LOAD_PATH << File.expand_path("/vendor/kinectic-sdk-rb", __FILE__)
>> ------------------------------------------------------------------------
>> *From:* ruby-talk <[email protected]> on behalf of Leam
>> Hall <[email protected]>
>> *Sent:* Thursday, November 7, 2019 12:16 PM
>> *To:* Ruby users <[email protected]>
>> *Subject:* Re: [External] re: Adding a directory to LOAD_PATH
>> Have you tried something like:
>>
>>       $LOAD_PATH << File.expand_path("../my_project/", __FILE__)
>>
>> That's what I usually do, with "../lib".
>>
>> Leam
>>
>>
>> On 11/7/19 11:55 AM, Tran, Minh wrote:
>>>
>>> Thank you so much Raj for all of the helps.
>>> Since I am new to Ruby, could I ask on how could I add my project vendo=
r
>>> directory to the load path ?
>>>
>>> I did a ruby -e 'puts $LOADPATH' command , and it gave me my current
>>> LOAD_PATH
>>>
>>> /usr/local/lib/site_ruby/2.3.0
>>> /usr/local/lib/x86_64-linux-gnu/site_ruby
>>> /usr/local/lib/site_ruby
>>> /usr/lib/ruby/vendor_ruby/2.3.0
>>> /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0
>>> /usr/lib/ruby/vendor_ruby
>>> /usr/lib/ruby/2.3.0
>>> /usr/lib/x86_64-linux-gnu/ruby/2.3.0
>>>
>>> I am still googling for a Ruby command that I could use to add my vendo=
r
>>> folder to the LOAD_PATH.
>>>
>>> Thanks for all of the helps,
>>> Minh
>>>
>>>
>>> -----------------------------------------------------------------------=
-
>>> *From:* ruby-talk <[email protected]> on behalf of Raj
>>> Sahae <[email protected]>
>>> *Sent:* Wednesday, November 6, 2019 5:54 PM
>>> *To:* Ruby users <[email protected]>
>>> *Subject:* [External] Re: Could not load a Ruby program
>>> This is sort of a strange thing to do. You are using require while
>>> dynamically generating the path based on the location of test.rb, which
>>> could change with respect to your vendor directory.
>>> Your error message would seem to indicate that the relative path of
>>> kinetic-sdk.rb from test.rb is not what you are specifying.
>>>
>>> If you want to use kinetic-sdk.rb as a library file, then the folder yo=
u
>>> want to load it from should be in your load path.
>>> There are a couple ways to do this but in my opinion the easiest to tes=
t
>>> with is using "ruby -I"
>>>
>>> So if I were you, I would keep kinetic-sdk.rb where it is, and add your
>>> projects vendor directory to the load path, and then call require in
>>> test.rb with that relative path.
>>>
>>> test.rb would be something like
>>>
>>> *#!/usr/bin/ruby
>>> *
>>> *puts "Hello World!"
>>> *
>>> *require 'kinectic-sdk-rb/kinectic-sdk.rb'*
>>> *
>>> *
>>> And you would run it with a command like
>>>
>>> ruby -I my_project/vendor test.rb
>>>
>>> You can persist that sort of thing by setting your RUBYLIB env variable=
,
>>> or changing load_path inside your test.rb, etc. There are many ways.
>>>
>>>
>>> -Raj
>>>
>>>
>>> On Wed, Nov 6, 2019 at 1:39 PM Tran, Minh <[email protected]=
g
>>> <mailto:[email protected]>> wrote:
>>>
>>>     Hello,
>>>
>>>          I have a scenario that I need to execute a program from the
>>>     other directory than my current directory.
>>>     I got an error when I ran it, and I would like to seek helps
>>>     and expertises.
>>>
>>>
>>>     My current directory is at my_project, and the program that
>>>     I would like to execute is
>>>     at my_project/vendor/kinectic-sdk-rb/kinectic-sdk.rb
>>>
>>>     In my current directory my_project, I have  a test.rb which contain=
s
>>>     a very simple line of code such as
>>>
>>>     #!/usr/bin/ruby
>>>     puts "Hello World!"
>>>     require File.join (File.expand_path (File.dirname(__FILE__)),
>>>     'vendor/kinectic-sdk-rb/kinectic-sdk.rb')
>>>
>>>
>>>     I tried to run the test.rb at my current directory which
>>>     is my_project , and I got the following error message:
>>>
>>>     Could not load file kinectic-sdk.rb  from
>>>     my  /my_project/vendor/kinectic-sdk-rb/kinectic-sdk.rb folder.
>>>
>>>
>>>     Thanks for all of your helps,
>>>     Minh
>>>
>>>
>>
>>
>> Unsubscribe: <mailto:[email protected]?subject=3Dunsubscri=
be>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>>
>> ------------------------------------------------------------------------
>>
>> This e-mail message (including any attachments) is for the sole use of
>> the intended recipient(s) and may contain confidential and privileged
>> information. If the reader of this message is not the intended
>> recipient, you are hereby notified that any dissemination, distribution
>> or copying of this message (including any attachments) is strictly
>> prohibited.
>>
>> If you have received this message in error, please contact
>> the sender by reply e-mail message and destroy all copies of the
>> original message (including attachments).
>
>
> Unsubscribe: <mailto:[email protected]?subject=3Dunsubscrib=
e>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>


Unsubscribe: <mailto:[email protected]?subject=3Dunsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

--_000_SN6PR05MB5391526F655EBE84D5A2E416EE780SN6PR05MB5391namp_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"color: rgb(0, 0, 0); font-family: Calibri,Arial,Helvetica,san=
s-serif; font-size: 12pt;">
Thank you so much Leam for all of the helps. It works.</div>
<div style=3D"color: rgb(0, 0, 0); font-family: Calibri,Arial,Helvetica,san=
s-serif; font-size: 12pt;">
Regards,</div>
<div style=3D"color: rgb(0, 0, 0); font-family: Calibri,Arial,Helvetica,san=
s-serif; font-size: 12pt;">
Minh</div>
<div style=3D"color: rgb(0, 0, 0); font-family: Calibri,Arial,Helvetica,san=
s-serif; font-size: 12pt;">
&nbsp;<br>
</div>
<div id=3D"appendonsend"></div>
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st=
yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> ruby-talk &lt;ruby-ta=
[email protected]&gt; on behalf of Leam Hall &lt;[email protected]&=
gt;<br>
<b>Sent:</b> Thursday, November 7, 2019 1:52 PM<br>
<b>To:</b> Ruby users &lt;[email protected]&gt;<br>
<b>Subject:</b> Re: [External] re: Adding a directory to LOAD_PATH</font>
<div>&nbsp;</div>
</div>
<div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt;=
">
<div class=3D"PlainText">Try putting &quot;..&quot; before &quot;/vendor&qu=
ot;, do not have a space between
<br>
&quot;expand_path&quot; and the &quot;(&quot;, and use File.expand_path ins=
tead of <br>
FILE.expand_path.<br>
<br>
This worked for me:<br>
<br>
&nbsp;&nbsp;&nbsp; ruby -e '$LOAD_PATH &lt;&lt; File.expand_path(&quot;../l=
ib/&quot;, __FILE__)'<br>
<br>
Leam<br>
<br>
<br>
On 11/7/19 1:46 PM, Tran, Minh wrote:<br>
&gt; I got an error message when I&nbsp;tried to use LOAD_PATH. I would lik=
e to <br>
&gt; seek your helps and expertise.<br>
&gt; <br>
&gt; Thanks!<br>
&gt; <br>
&gt; ruby -e '$LOAD_PATH &lt;&lt; FILE.expand_path <br>
&gt; (&quot;/vendor/kinectic-sdk-rb&quot;,__FILE__)'<br>
&gt; <br>
&gt; - syntax error, unexpected ( arg, expecting end-of-input<br>
&gt; ...LOAD_PATH &lt;&lt; FILE.expand_path (&quot;vendor/kinectic..<br>
&gt; <br>
&gt; <br>
&gt; ----------------------------------------------------------------------=
--<br>
&gt; *From:* ruby-talk &lt;[email protected]&gt; on behalf of=
 Leam <br>
&gt; Hall &lt;[email protected]&gt;<br>
&gt; *Sent:* Thursday, November 7, 2019 12:53 PM<br>
&gt; *To:* Ruby users &lt;[email protected]&gt;<br>
&gt; *Subject:* Re: [External] re: Adding a directory to LOAD_PATH<br>
&gt; Hey, since you're new to Ruby, I'll point you to one of the secrets:<b=
r>
&gt; irb. It gives you a live Ruby environment to try things out. I'm new t=
o<br>
&gt; Ruby too, and irb helps me learn. Here's an example:<br>
&gt; <br>
&gt; [leam@shaphan ruby]$ pwd; ls lib<br>
&gt; /home/leam/lang/ruby<br>
&gt; shot_string.rb<br>
&gt; <br>
&gt; [leam@shaphan ruby]$ irb<br>
&gt; <br>
&gt; irb(main):001:0&gt; require 'shot_string'<br>
&gt; Traceback (most recent call last):<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6: from /usr/lo=
cal/bin/irb:23:in `&lt;main&gt;'<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5: from /usr/lo=
cal/bin/irb:23:in `load'<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4: from<br>
&gt; /usr/local/lib/ruby/gems/2.7.0/gems/irb-1.1.0.pre.3/exe/irb:11:in `&lt=
;top<br>
&gt; (required)&gt;'<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3: from (irb):1=
<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2: from<br>
&gt; /usr/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:81:in<br=
>
&gt; `require'<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1: from<br>
&gt; /usr/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:81:in<br=
>
&gt; `require'<br>
&gt; LoadError (cannot load such file -- shot_string)<br>
&gt; <br>
&gt; irb(main):002:0&gt; $LOAD_PATH &lt;&lt; File.expand_path(&quot;../lib/=
&quot;, __FILE__)<br>
&gt; <br>
&gt; =3D&gt; [&quot;/usr/local/lib/ruby/gems/2.7.0/gems/did_you_mean-1.3.1/=
lib&quot;,<br>
&gt; &quot;/usr/local/lib/ruby/site_ruby/2.7.0&quot;,<br>
&gt; &quot;/usr/local/lib/ruby/site_ruby/2.7.0/x86_64-linux&quot;,<br>
&gt; &quot;/usr/local/lib/ruby/site_ruby&quot;,<br>
&gt; &quot;/usr/local/lib/ruby/vendor_ruby/2.7.0&quot;,<br>
&gt; &quot;/usr/local/lib/ruby/vendor_ruby/2.7.0/x86_64-linux&quot;,<br>
&gt; &quot;/usr/local/lib/ruby/vendor_ruby&quot;, &quot;/usr/local/lib/ruby=
/2.7.0&quot;,<br>
&gt; &quot;/usr/local/lib/ruby/2.7.0/x86_64-linux&quot;, &quot;/home/leam/l=
ang/ruby/lib&quot;]<br>
&gt; <br>
&gt; irb(main):003:0&gt; require 'shot_string'<br>
&gt; =3D&gt; true<br>
&gt; irb(main):004:0&gt;<br>
&gt; <br>
&gt; <br>
&gt; Leam<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; On 11/7/19 12:41 PM, Tran, Minh wrote:<br>
&gt;&gt; Thank you so much Leam.<br>
&gt;&gt; I would like to&nbsp;load the kinetic-sdk.rb program in <br>
&gt;&gt; /vendor/kinetic-sdk-rb/&nbsp;&nbsp;to my current working directory=
 /my_project ;<br>
&gt;&gt; so would the following command work ?<br>
&gt;&gt; <br>
&gt;&gt; $LOAD_PATH &lt;&lt; File.expand_path(&quot;/vendor/kinectic-sdk-rb=
&quot;, __FILE__)<br>
&gt;&gt; ------------------------------------------------------------------=
------<br>
&gt;&gt; *From:* ruby-talk &lt;[email protected]&gt; on behal=
f of Leam <br>
&gt;&gt; Hall &lt;[email protected]&gt;<br>
&gt;&gt; *Sent:* Thursday, November 7, 2019 12:16 PM<br>
&gt;&gt; *To:* Ruby users &lt;[email protected]&gt;<br>
&gt;&gt; *Subject:* Re: [External] re: Adding a directory to LOAD_PATH<br>
&gt;&gt; Have you tried something like:<br>
&gt;&gt; <br>
&gt;&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; $LOAD_PATH &lt;&lt; File.expand_pat=
h(&quot;../my_project/&quot;, __FILE__)<br>
&gt;&gt; <br>
&gt;&gt; That's what I usually do, with &quot;../lib&quot;.<br>
&gt;&gt; <br>
&gt;&gt; Leam<br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; On 11/7/19 11:55 AM, Tran, Minh wrote:<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; Thank you so much Raj for all of the helps.<br>
&gt;&gt;&gt; Since I am new to Ruby, could I ask on how could I add my proj=
ect vendor <br>
&gt;&gt;&gt; directory to the load path ?<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; I did a ruby -e 'puts $LOADPATH' command , and it gave me my c=
urrent <br>
&gt;&gt;&gt; LOAD_PATH<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; /usr/local/lib/site_ruby/2.3.0<br>
&gt;&gt;&gt; /usr/local/lib/x86_64-linux-gnu/site_ruby<br>
&gt;&gt;&gt; /usr/local/lib/site_ruby<br>
&gt;&gt;&gt; /usr/lib/ruby/vendor_ruby/2.3.0<br>
&gt;&gt;&gt; /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0<br>
&gt;&gt;&gt; /usr/lib/ruby/vendor_ruby<br>
&gt;&gt;&gt; /usr/lib/ruby/2.3.0<br>
&gt;&gt;&gt; /usr/lib/x86_64-linux-gnu/ruby/2.3.0<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; I am still&nbsp;googling for a Ruby command that I could use t=
o add my vendor <br>
&gt;&gt;&gt; folder to the LOAD_PATH.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; Thanks for all of the helps,<br>
&gt;&gt;&gt; Minh<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; --------------------------------------------------------------=
----------<br>
&gt;&gt;&gt; *From:* ruby-talk &lt;[email protected]&gt; on b=
ehalf of Raj <br>
&gt;&gt;&gt; Sahae &lt;[email protected]&gt;<br>
&gt;&gt;&gt; *Sent:* Wednesday, November 6, 2019 5:54 PM<br>
&gt;&gt;&gt; *To:* Ruby users &lt;[email protected]&gt;<br>
&gt;&gt;&gt; *Subject:* [External] Re: Could not load a Ruby program<br>
&gt;&gt;&gt; This is sort of a strange thing to do. You are using require w=
hile <br>
&gt;&gt;&gt; dynamically generating the path based on the location of test.=
rb, which <br>
&gt;&gt;&gt; could change with respect to your vendor directory.<br>
&gt;&gt;&gt; Your error message would seem to indicate that the relative pa=
th of <br>
&gt;&gt;&gt; kinetic-sdk.rb from test.rb is not what you are specifying.<br=
>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; If you want to use kinetic-sdk.rb as a library file, then the =
folder you <br>
&gt;&gt;&gt; want to load it from should be in your load path.<br>
&gt;&gt;&gt; There are a couple ways to do this but in my opinion the easie=
st to test <br>
&gt;&gt;&gt; with is using &quot;ruby -I&quot;<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; So if I were you, I would keep kinetic-sdk.rb where it is, and=
 add your <br>
&gt;&gt;&gt; projects vendor directory to the load path, and then call requ=
ire in <br>
&gt;&gt;&gt; test.rb with that relative path.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; test.rb would be something like<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; *#!/usr/bin/ruby<br>
&gt;&gt;&gt; *<br>
&gt;&gt;&gt; *puts &quot;Hello World!&quot;<br>
&gt;&gt;&gt; *<br>
&gt;&gt;&gt; *require 'kinectic-sdk-rb/kinectic-sdk.rb'*<br>
&gt;&gt;&gt; *<br>
&gt;&gt;&gt; *<br>
&gt;&gt;&gt; And you would run it with a command like<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; ruby -I my_project/vendor test.rb<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; You can persist that sort of thing by setting your RUBYLIB env=
 variable, <br>
&gt;&gt;&gt; or changing load_path inside your test.rb, etc. There are many=
 ways.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; -Raj<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; On Wed, Nov 6, 2019 at 1:39 PM Tran, Minh &lt;minh.tran@emoryh=
ealthcare.org <br>
&gt;&gt;&gt; &lt;<a href=3D"mailto:[email protected]">mailto:mi=
[email protected]</a>&gt;&gt; wrote:<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; Hello,<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; I have a scen=
ario that I&nbsp;need to execute a program from the<br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; other directory than my current direct=
ory.<br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; I got an error when I ran it, and I wo=
uld like to seek helps<br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; and&nbsp;expertises.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; My current directory is at my_project,=
 and&nbsp;the&nbsp;program that<br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; I&nbsp;would&nbsp;like&nbsp;to execute=
 is<br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;my_project/vendor/kinectic-sdk=
-rb/kinectic-sdk.rb<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; In my current directory my_project, I =
have&nbsp; a test.rb which contains<br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; a very simple line of code such as<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; #!/usr/bin/ruby<br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; puts &quot;Hello World!&quot;<br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; require File.join (File.expand_path (F=
ile.dirname(__FILE__)),<br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 'vendor/kinectic-sdk-rb/kinectic-sdk.r=
b')<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; I tried to run the test.rb at my curre=
nt directory&nbsp;which<br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; is&nbsp;my_project , and I got the fol=
lowing error message:<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; Could not load&nbsp;file kinectic-sdk.=
rb&nbsp; from<br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; my&nbsp;&nbsp;/my_project/vendor/kinec=
tic-sdk-rb/kinectic-sdk.rb folder.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; Thanks for all of your helps,<br>
&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; Minh<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; Unsubscribe: &lt;<a href=3D"mailto:[email protected]=
?subject=3Dunsubscribe">mailto:[email protected]?subject=3Dun=
subscribe</a>&gt;<br>
&gt;&gt; &lt;<a href=3D"http://lists.ruby-lang.org/cgi-bin/mailman/options/=
ruby-talk">http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk</a>=
&gt;<br>
&gt;&gt; <br>
&gt;&gt; ------------------------------------------------------------------=
------<br>
&gt;&gt; <br>
&gt;&gt; This e-mail message (including any attachments) is for the sole us=
e of<br>
&gt;&gt; the intended recipient(s) and may contain confidential and privile=
ged<br>
&gt;&gt; information. If the reader of this message is not the intended<br>
&gt;&gt; recipient, you are hereby notified that any dissemination, distrib=
ution<br>
&gt;&gt; or copying of this message (including any attachments) is strictly=
<br>
&gt;&gt; prohibited.<br>
&gt;&gt; <br>
&gt;&gt; If you have received this message in error, please contact<br>
&gt;&gt; the sender by reply e-mail message and destroy all copies of the<b=
r>
&gt;&gt; original message (including attachments).<br>
&gt; <br>
&gt; <br>
&gt; Unsubscribe: &lt;<a href=3D"mailto:[email protected]?sub=
ject=3Dunsubscribe">mailto:[email protected]?subject=3Dunsubs=
cribe</a>&gt;<br>
&gt; &lt;<a href=3D"http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby=
-talk">http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk</a>&gt;=
<br>
<br>
<br>
Unsubscribe: &lt;<a href=3D"mailto:[email protected]?subject=
=3Dunsubscribe">mailto:[email protected]?subject=3Dunsubscrib=
e</a>&gt;<br>
&lt;<a href=3D"http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk=
">http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk</a>&gt;<br>
</div>
</span></font></div>
</body>
</html>

--_000_SN6PR05MB5391526F655EBE84D5A2E416EE780SN6PR05MB5391namp_--

--===============1098895472==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

--===============1098895472==--