ruby-on-rails – 为什么我的环境需要我运行bundle exec?
发布时间:2020-12-16 20:43:19 所属栏目:百科 来源:网络整理
导读:每当我运行rake命令(即rake路由),我得到这个错误: You have already activated rake 0.9.2.2,but your Gemfile requires rake 0.9.2. Using bundle exec may solve this. 如果我运行捆绑exec rake路由它工作. 我想要能够简单地耙路径,而不必运行bundle exec
每当我运行rake命令(即rake路由),我得到这个错误:
You have already activated rake 0.9.2.2,but your Gemfile requires rake 0.9.2. Using bundle exec may solve this. 如果我运行捆绑exec rake路由它工作. 我想要能够简单地耙路径,而不必运行bundle exec rake路由. 我看过其他类似错误的问题,并尝试过各种解决方案(如运行捆绑更新)无效. 另外,在我的gemfile中我指定了gem’rake’,’0.9.2′ 有什么建议么? 解决方法
尝试执行:
gem list 你可能会看到一些安装了rake的版本.顺便说一下,bundle exec是在rails应用程序的上下文中执行代码的正确方法,请参阅this获得一个很好的解释.因此,您可以使用别名输入较少的别名. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |