问题描述
rails框架中在Gemfile中添加gem ‘pry-rails’后执行bundle install后报错:You are trying to install in deployment mode after changing。
百度谷歌了一大堆都没说明白具体要求怎么做,吐槽一下rails的社区环境真的垃圾。
解决方法
解决方法其实很简单:
执行下面的命令就行了
bundle config unset deployment
再次执行bundle install,完美运行
原因:执行bundle install --help ,有这样一行内容
--deployment
In deployment mode, Bundler will ´roll-out´ the bundle for production or CI use. Please check carefully if you want to have this option enabled in your development environment.
--deployment 一般不能用在开发服务器中,否则会引起错误,查查历史记录是否有执行 bundle install --deployment