ruby on rails - opening the pry console in sandbox mode -


I was bothered recently and I think this is a great replacement for irb. I thought I was using it for my ROR development and debugging. I know that just to open you with a rail app, just type

  pry -r ./config/environment   

my question is That there is a way to open proxy console in sandbox mode so that any amendments do not affect my database.

Firstly add "pre-rail" Gem Gemfile

  Gem 'pry-rails' ,: group = & gt; :  bundle install   

then launch Rail Console in sandbox mode

  # Env $ rails in development c --sandbox # or test env $ rails c test --sandbox   

All this will automatically replace Pry's IRB. I enjoy!

Ref:

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

jsp - Google line chart x-axis shrinks on transition -

java - Reaching JTextField in a DocumentListener -