20140605

pow and byebug - staying in the web app dev env heaven: an update for ruby 2.1

The previous version (for ruby 1.9) is here.

It seems ruby-debug has fallen out of favour with the community and the replacement is byebug.
So here's my follow-up on the old post.

The steps to enable byebugging in your app dev env:
  1. echo export POW_WORKERS=1 >> ~/.powconfig  # make sure pow runs only one app process — globally
  2. cd <your project directory>
  3. Add byebug to your bundle (and remove ruby-debug if exists).
  4. Paste the following snippet at the end of your config/environments/development.rb — for rails, or in the appropriate development environment initialisation module — for the platform of your choice:
  5. echo export RUBY_DEBUG_PORT=10007 >> .powenv  # make sure we enable debugging with a machine-unique port, e.g. 10007 (you should pick different ports for different projects)
  6. touch tmp/restart.txtThen make any request to actually restart your server.
  7. byebug -R localhost:10007 -d  # you're back in business, go wild with debugger's in your code

27 comments:

  1. These are very useful steps to enable byebugging in your app development environment. I learn important things about this topic. Thanks for sharing! web application development

    ReplyDelete
  2. Web development is very popular term in the field of IT now days. Thanks for given some important information about web development. CodCow

    ReplyDelete
  3. Ruby is a good alternative to the older programming languages. I hope that it will be evolve with each new update. We are using it sometimes in mobile development, but not very often. Our partners http://www.nixsolutions.com/ are using it all the time. And their reviews are very good.

    ReplyDelete
  4. Quick plug here :) Any ruby on rails developers looking for remote work. Please check out http://webwork.io

    ReplyDelete
  5. Your contents are too simple to read and easy to understand.web design tips

    ReplyDelete
  6. Though prices should not be the only criteria while selecting the best corporate web design company, you wouldn't want to spend more than your budget. our website

    ReplyDelete

  7. The necessary product for user than need for daily day is available now ABestProDog Bed | Eyebrow Gel | Cheese | Plastic Wine Glass | Measuring Cup | Cereal |

    ReplyDelete
  8. A sumptuous blog indeed. Loved every bit of it
    wordpress website

    ReplyDelete

  9. This is genuinely an awesome read for me. I have bookmarked it and I am anticipating perusing new articles. Keep doing awesome!
    Web Development

    ReplyDelete
  10. I invite you to the page where see how much we have in common.
    mason soiza

    ReplyDelete
  11. Great, thanks for giving this kind of good info and this can help me on SEO KL, keep it up.

    ReplyDelete
  12. Hello, this is a nicely explained article. Your piece was very informative. I had never heard the issue presented in that light. Thanks for your hard work.
    web design company selangor
    catalogue design
    editorial design
    branding agency in kuala lumpur

    ReplyDelete
  13. That's interesting, you have done a great job. Thanks for sharing.
    ndt inspection malaysia
    unfired pressure vessel

    ReplyDelete
  14. Thanks for this post. I really enjoy your point of view on this topic. Hope you are doing well.
    building automation system
    energy performance contract
    large scale solar malaysia

    ReplyDelete
  15. Appreciating the persistence you put into your blog and the detailed information you provide. Keep up the good work.
    food packaging malaysia
    plastic food container malaysia
    cookies packaging malaysia

    ReplyDelete
  16. Great post. Looking forward to reading more. Thanks for taking the time to write this.
    disaster recovery services
    cloud backup malaysia
    data backup service malaysia

    ReplyDelete
  17. What to do when you are free? Let’s read.
    five guys menu prices
    little caesars menu and five guys

    ReplyDelete
  18. Hey, this is a great post, so clear and easy to understand. All your hard work is much appreciated.
    fire extinguisher
    fire sprinkler system
    ccc malaysia

    ReplyDelete