<div dir="ltr">Thanks Steve. Dave also emailed me and said that I could just download pry-remote as a gem and use it with MRI Ruby which is what I did. </div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 10, 2016 at 12:01 PM, Majewski, Steven Dennis (sdm7g) <span dir="ltr"><<a href="mailto:sdm7g@eservices.virginia.edu" target="_blank">sdm7g@eservices.virginia.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="word-wrap:break-word">
<div><br>
</div>
<div>The gem and binaries should be installed in the archivesspace build/gems directory, but ./build/gems/bin isn’t </div>
<div>on your path, and just running ./build/gems/bin/pry-remote will get an error unless you run it thru the bundler,</div>
<div>as it won’t find the pry-remote gems. </div>
<div><br>
</div>
<div><br>
</div>
<div>My hacked version of jirb script has a fallthru “$*” at the end. </div>
<div>I keep it in the parent directory of my archivesspace directory, so for me running:</div>
<div><br>
</div>
<div>../jirb.sh bundle exec pry-remote </div>
<div><br>
</div>
<div>works. </div>
<div><br>
</div>
<div></div>
</div>
<div style="word-wrap:break-word">
<div></div>
<div><br>
</div>
<div>But my procedures for AS development environment are constantly being tweaked as I run into new issues.</div>
<div>Lately, I’ve been trying to work RubyMine into the environment, but I can’t seem to be able to get it </div>
<div>to find my Gems in the correct place. Before finding method of ‘bundle exec’ with those environment settings,</div>
<div>I was keeping a duplicate set of Gems installed in the rbenv environment. I may have to go back to doing</div>
<div>that to get RubyMine to find them. </div>
<div><br>
</div>
<div><br>
</div>
<div>— Steve. </div>
<div><br>
</div>
<br>
<div>
<blockquote type="cite"><div><div class="h5">
<div>On Feb 10, 2016, at 9:34 AM, Esha Datta <<a href="mailto:esha@nyu.edu" target="_blank">esha@nyu.edu</a>> wrote:</div>
<br>
</div></div><div><div><div class="h5">
<div dir="ltr">
<p dir="ltr">Thanks for your email. I got the gem to install as you had mentioned; however, I'm not sure how to get pry-remote to work. I see the message: </p>
<p dir="ltr">[java] [pry-remote] Waiting for client on druby://<a href="http://127.0.0.1:9876/" target="_blank">127.0.0.1:9876</a></p>
<p>But, when I try to do pry-remote in the terminal, I get a bash error: command not found. I googled around trying to see how to run pry-remote within jruby and didn't find anything of value. These are the commands I tried:</p>
<p>1. pry-remote: Got an error: -bash: pry-remote: command not found</p>
<p>2. ./scripts/jruby -S pry-remote. Error: jruby: No such file or directory -- pry (LoadError)</p>
<p>Thanks for your help!</p>
<p><br>
</p>
<p>Esha</p>
<p><br>
</p>
<p>On Feb 9, 2016 11:28 PM, "Mayo, Dave" <<a href="mailto:dave_mayo@harvard.edu" target="_blank">dave_mayo@harvard.edu</a>> wrote:</p>
<div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word;font-family:Calibri,sans-serif;font-size:14px">
<div>Hi Esha,</div>
<div><br>
</div>
<div>As far as running bundler, I've found that running:</div>
<div><br>
</div>
<div>./build/run bundler -Dgemfile=../backend/Gemfile </div>
<div><br>
</div>
<div>from the archivesspace root directory gets the contents of that Gemfile installed properly.</div>
<div><br>
</div>
<div>I'm running my devserver via `.build/run backend:devserver`. If you're doing the same, `binding.pry` STILL won't work, because the backend doesn't log directly to console, and whatever intermediate it's using (Ant? I think Ant) only does output. What
I DID get working was installing the pry-remote Gem, and then doing `binding.remote_pry` and connecting from another terminal.</div>
<div><br>
</div>
<div>Let me know if this works out for you, or if there's anything else I can possibly do to help.</div>
<div><br>
</div>
<div>- Dave Mayo</div>
<div> Library Software Engineer</div>
<div> Harvard University -> HUIT -> LTS</div>
<div><br>
</div>
<div><br>
</div>
<div>From: Esha Datta <<a href="mailto:esha@nyu.edu" target="_blank">esha@nyu.edu</a>></div>
<div>Reply-To: "<a href="mailto:esha@nyu.edu" target="_blank">esha@nyu.edu</a>" <<a href="mailto:esha@nyu.edu" target="_blank">esha@nyu.edu</a>>, Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank">archivesspace_users_group@lyralists.lyrasis.org</a>></div>
<div>Date: Tuesday, February 9, 2016 at 8:04 PM</div>
<div>To: "<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank">archivesspace_users_group@lyralists.lyrasis.org</a>" <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank">archivesspace_users_group@lyralists.lyrasis.org</a>></div>
<div>Subject: [Archivesspace_Users_Group] archivesspace newbie questions</div>
<div><br>
</div>
<div><br>
</div>
<div>Hi,</div>
<div><br>
</div>
<div>I'm a developer with NYU's Bobst Library and am new to JRuby and ArchivesSpace. I have to write a plugin and am trying to use pry for stepping through some code. I have done some rails work before and tried to install pry by adding it to the backend/
Gemfile</div>
<div>and then running ./scripts/jruby -S bundle install. The command ran but didn't install pry. I then tried to install it by doing the following:
</div>
<div>./scripts/jruby -S gem install pry</div>
<div>That installed pry but when I tried to use it in the backend by doing "binding.pry", I got an error saying it's an undefined method. If anyone has pointers as to how to use pry in this environment, I'd really appreciate it. Basically, I'm trying
to figure</div>
<div>out what certain objects have and return in order to write the plugin.</div>
<div><br>
</div>
<div>Also, I will need to write tests for the plugin. Sorry, if I've missed documentation in how to write tests for the plugin and how to run them. If someone could point me to that, I'd really appreciate it.</div>
<div><br>
</div>
<div>Thanks for your time.</div>
<div><br>
</div>
<div>Esha</div>
<div><br>
</div>
</div>
</blockquote>
</div>
</div></div></div><span class="">
_______________________________________________<br>
Archivesspace_Users_Group mailing list<br>
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" target="_blank">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br>
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br>
</span></div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote></div><br></div>