Skip to main content

Mobomo webinars-now on demand! | learn more.

Have a great idea? Do you daydream about founding a startup? Do you have the entrepreneurial spirit but don't know how to kickstart your vision?

Then join us on May 12th at the Artisphere in Arlington, Va for "A Day of Foster.ly" - an engaging event led by DC, Maryland and Virginia entrepreneurs, designed to empower startups, visionaries, innovative students and other aspiring entrepreneurs like yourself with the resources and information needed to get started and to succeed.

The event kicks off with a morning Study Hall session, (Study Hall is a collaborative co-working environment for entrepreneurial-minded people) and follows with an Entrepreneurship Research Expo, informative panels and demos, mentorship sessions with Angel investors and an exciting keynote from Aneesh Chopra, the first Chief Technology Officer for the United States. Finish the night with a seriously good after party in the ballroom featuring live music from Two Car Living Room and FatBackDC DJs Philippe & Steven, and exclusive movie screenings.

For those of you who may be interested in the nuts and bolts of running a web development company you won't want to miss the 4:30 pm panel, "Development & Design" in which Jurgen Altziebler, Managing Director of UX at Intridea, will be discussing tactics and sharing personal stories alongside other local industry-leading moguls like nclud, Sisarina, Viget and Whitmoyer.

Tickets are selling quickly, but there are a limited number still available for A Day of Foster.ly. Register today and set your future as an entrepreneur in motion.

Intridea partnered with Foster.ly this year to help bring events like this to the growing community of entrepreneurs in the DC area. We're excited to be a part of the work that Foster.ly is doing and we're looking forward to talking with many of you about design, development and strategy at A Day of Foster.ly and future Foster.ly events.

Categories
Author

You've heard of Pry right? It's a full-featured alternative to the classic IRB shell that we use in Ruby, and it's awesomesauce. If you've ever felt like you wanted a crowbar to pry open your code during runtime... well, Pry is your answer.

Pry is essentially a REPL (read–eval–print loop) tool that you can use to examine and debug your code. One of the best features is that local variables are available to Pry, saving you from recreating them as you normally would in an IRB session.

Installing Pry

I like to install pry into the global gemset since it's a tool even when I'm outside of a Rails project

rvm use @global gem install pry 

Replacing IRB with Pry

In your application initialization, add the following to replace IRB with pry by default. For example, Rails would add this code to config/initializers/pry.rb

begin   require "pry"   IRB = pry rescue   # do nothing if pry fails to load end 

Replacing ruby-debug with Pry

Between different versions of Ruby, installing and requiring ruby-debug can lead to annoying problems. 1.8.7 uses ruby-debug, 1.9.2 requires ruby-debug19, and 1.9.3 blows up when you try to use ruby-debug19. ruby-debug also depends on the linecache gem, which sometimes requires extra work to use with rvm and sometimes fails in environments when the native extensions fail to build.

Instead, skip all that headache with Pry! Anywhere you would use a 'debugger' statement, just call:

binding.pry 

'binding' is a reference to the current local context. Enter 'exit' when you're finished with debugging, and the code will resume executing

Additional features

Pry has a ton of other productivity boosters built in. You can drop into a shell temporarily, browse docs without leaving your shell, edit and reload code, and send code snippets up to gist.

There's a ton of documentation for Pry and a growing community around it; if you're interested in jumping in be sure to start at their Github page for links to tutorials, screencasts, FAQs and a Wiki!

Disclaimer: We love Pry so much we were compelled to donate funds to the project. And write this blog post about it. If you like it, you can support them too!

Categories
Author
1
Subscribe to Support