<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="" style="word-wrap:break-word">
<div class=""><br class="">
</div>
<div class="">The gem and binaries should be installed in the archivesspace build/gems directory, but ./build/gems/bin isn’t </div>
<div class="">on your path, and just running ./build/gems/bin/pry-remote will get an error unless you run it thru the bundler,</div>
<div class="">as it won’t find the pry-remote gems. </div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">My hacked version of jirb script has a fallthru “$*” at the end. </div>
<div class="">I keep it in the parent directory of my archivesspace directory, so for me running:</div>
<div class=""><br class="">
</div>
<div class="">../jirb.sh bundle exec pry-remote </div>
<div class=""><br class="">
</div>
<div class="">works. </div>
<div class=""><br class="">
</div>
<div class=""></div>
</div>
<div class="" style="word-wrap:break-word">
<div class=""></div>
<div class=""><br class="">
</div>
<div class="">But my procedures for AS development environment are constantly being tweaked as I run into new issues.</div>
<div class="">Lately, I’ve been trying to work RubyMine into the environment, but I can’t seem to be able to get it </div>
<div class="">to find my Gems in the correct place. Before finding method of ‘bundle exec’ with those environment settings,</div>
<div class="">I was keeping a duplicate set of Gems installed in the rbenv environment. I may have to go back to doing</div>
<div class="">that to get RubyMine to find them. </div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">— Steve. </div>
<div class=""><br class="">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Feb 10, 2016, at 9:34 AM, Esha Datta <<a href="mailto:esha@nyu.edu" class="">esha@nyu.edu</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<p dir="ltr" class="">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" class="">[java] [pry-remote] Waiting for client on druby://<a href="http://127.0.0.1:9876/" class="">127.0.0.1:9876</a></p>
<p class="">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 class="">1. pry-remote: Got an error: -bash: pry-remote: command not found</p>
<p class="">2. ./scripts/jruby -S pry-remote. Error: jruby: No such file or directory -- pry (LoadError)</p>
<p class="">Thanks for your help!</p>
<p class=""><br class="">
</p>
<p class="">Esha</p>
<p class=""><br class="">
</p>
<p class="">On Feb 9, 2016 11:28 PM, "Mayo, Dave" <<a href="mailto:dave_mayo@harvard.edu" target="_blank" class="">dave_mayo@harvard.edu</a>> wrote:</p>
<div class="x_gmail_quote">
<blockquote class="x_gmail_quote" 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 class="" style="word-wrap:break-word; font-family:Calibri,sans-serif; font-size:14px">
<div class="">Hi Esha,</div>
<div class=""><br class="">
</div>
<div class="">As far as running bundler, I've found that running:</div>
<div class=""><br class="">
</div>
<div class="">./build/run bundler -Dgemfile=../backend/Gemfile </div>
<div class=""><br class="">
</div>
<div class="">from the archivesspace root directory gets the contents of that Gemfile installed properly.</div>
<div class=""><br class="">
</div>
<div class="">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 class=""><br class="">
</div>
<div class="">Let me know if this works out for you, or if there's anything else I can possibly do to help.</div>
<div class=""><br class="">
</div>
<div class="">- Dave Mayo</div>
<div class=""> Library Software Engineer</div>
<div class=""> Harvard University -> HUIT -> LTS</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">From: Esha Datta <<a href="mailto:esha@nyu.edu" target="_blank" class="">esha@nyu.edu</a>></div>
<div class="">Reply-To: "<a href="mailto:esha@nyu.edu" target="_blank" class="">esha@nyu.edu</a>" <<a href="mailto:esha@nyu.edu" target="_blank" class="">esha@nyu.edu</a>>, Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank" class="">archivesspace_users_group@lyralists.lyrasis.org</a>></div>
<div class="">Date: Tuesday, February 9, 2016 at 8:04 PM</div>
<div class="">To: "<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank" class="">archivesspace_users_group@lyralists.lyrasis.org</a>" <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank" class="">archivesspace_users_group@lyralists.lyrasis.org</a>></div>
<div class="">Subject: [Archivesspace_Users_Group] archivesspace newbie questions</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Hi,</div>
<div class=""><br class="">
</div>
<div class="">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 class="">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 class="">./scripts/jruby -S gem install pry</div>
<div class="">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 class="">out what certain objects have and return in order to write the plugin.</div>
<div class=""><br class="">
</div>
<div class="">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 class=""><br class="">
</div>
<div class="">Thanks for your time.</div>
<div class=""><br class="">
</div>
<div class="">Esha</div>
<div class=""><br class="">
</div>
</div>
</blockquote>
</div>
</div>
_______________________________________________<br class="">
Archivesspace_Users_Group mailing list<br class="">
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" class="">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br class="">
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>