Change default console to Pry?

Hello,
I just opened https://github.com/theforeman/foreman/pull/7314 which, if accepted, will change the default development console from IRB to Pry. I’m guessing most developers are already using pry anyways, so this is aimed at making this the standard and installing some useful plugins for everyone. Opening the PR caused me to wonder if we should change the default console in production as well.
To help decide please vote on the poll below, which will close in about a week:

  • Keep IRB as the default everywhere
  • Keep IRB for production but use Pry for development
  • Change both production and development to Pry

0 voters

cc: @core

I can’t think about any reason why not to migrate production to pry.

Pry is a new dependency mostly useful for developers, so no to production from me. For people new to Ruby, many articles describe IRB. While pry is not that different for initial steps, it’s still something people may find non-standard and confusing. In development I wouldn’t mind if it’s optional, e.g. it loads if installed. IRB in Ruby 2.7 looks more promising. I usually start pry from IRB console only when needed.

Not a strong opinion though. I’m ok with a change.

Personally I prefer Pry, but I don’t know what is the “cost” of using it in production. I suppose that if it has development dependencies like ruby-devel e.t.c. it would be better to avoid installing those in production (at least from security reasons - dev libraries are probably less secure).

1 Like

I tend to agree with @Marek_Hulan and @Shimon_Shtein. the fact that there is a troubleshooting tool in production makes the argument for pry a little less appealing, TBH I’m also less in favor of users “playing” with pry without knowledge as the possibility to damage things is higher.

I’m in favor of keeping IRB. you could include it in the console group by default and then its installable…

I’m not sure if it’s very helpful to switch to pry for every developer, because it’s really easy to switch manually, but if it is default, I wouldn’t mind. For production, I’m with @Marek_Hulan, only advantage of pry for production could be the history, but I don’t believe it’s so strong it would justify non standart solution.

Looks like the consensus is that we can change the development default, and the points raised actually caused me to change my opinion about changing the production console. Lets merge the associated PR.