Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails &引用;rake db:create:all";不包括「;bundle exec“;_Ruby On Rails_Postgresql - Fatal编程技术网

Ruby on rails &引用;rake db:create:all";不包括「;bundle exec“;

Ruby on rails &引用;rake db:create:all";不包括「;bundle exec“;,ruby-on-rails,postgresql,Ruby On Rails,Postgresql,我错误地使用rake db:create:all创建了数据库,但没有包含bundle exec。我是否应该删除所有数据库并使用bundle exec rake db:create:all重新创建它们 bundle exec rake db:create:all在当前bundle的上下文中使用命令db:create:all执行rake脚本 在某些情况下,如果您的系统中没有安装可执行文件,或者引入了与捆绑包冲突的gem,那么在没有安装可执行文件的情况下运行可执行文件(如db:create:all)可

我错误地使用
rake db:create:all
创建了数据库,但没有包含
bundle exec
。我是否应该删除所有数据库并使用bundle exec rake db:create:all重新创建它们

bundle exec rake db:create:all
在当前bundle的上下文中使用命令db:create:all执行rake脚本
在某些情况下,如果您的系统中没有安装可执行文件,或者引入了与捆绑包冲突的gem,那么在没有安装可执行文件的情况下运行可执行文件(如db:create:all)可能不起作用

但是,在您的情况下,它工作正常,没有返回任何错误,不需要删除和重新创建数据库

bundle exec只需在给定的gem环境中运行该命令。创建数据库时不需要这样做,所以不,您应该没问题。较新版本的
bundler
rubygems
减少了执行显式
bundle exec的必要性。