您已经激活了机架 1.3.2,但您的 Gemfile 需要机架 1.2.3。考虑使用捆绑执行

发布于 2024-12-02 11:43:20 字数 660 浏览 6 评论 0原文

我在尝试运行我的应用程序时遇到了问题:

You have already activated rack 1.3.2, but your Gemfile requires rack 1.2.3. Consider using bundle exec.

我阅读了很多有关此类错误的信息,但我没有找到任何适合我的解决方案

  • 我已经删除了我的 Gemfile.lock 并按照建议重新运行捆绑包 <一个href="https://stackoverflow.com/questions/7060749/deactivate-a-gem-you-have-already-activated-rake-0-9-3-beta-1-but-my-gemfile">此处< /a>
  • 我已经使用最新版本的乘客 (3.0.8) - 按照建议 此处< /a>
  • bundle exec rake 技巧不能在我的情况下使用,

谢谢您的帮助

I've got a problem while i try to run my app :

You have already activated rack 1.3.2, but your Gemfile requires rack 1.2.3. Consider using bundle exec.

I read a lot about this kind of error, but i did not find any solution that worked for me

  • I already removed my Gemfile.lock and re-run bundle as suggested here
  • I already use the latest version of passenger (3.0.8) - as suggested here
  • The bundle exec rake trick cannot be used in my case

Thank you per advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

跨年 2024-12-09 11:43:21

运行 bundle install --binstubs ,您将在应用程序根目录中获得 bin 目录,其中包含应用程序所需的所有可执行文件。

然后,您需要将此目录添加到路径和最佳位置 - .rvmrc(如果您使用 RVM)。

[ -d './bin' ] && export PATH=`pwd`/bin:$PATH

或者只是从应用程序根目录运行 ./bin/{rake|rails|etc} 。

Run bundle install --binstubs and you'll get bin directory in your application root with all executables needed by app.

Then you need to add this dir to path and best place to do it - .rvmrc if you use RVM.

[ -d './bin' ] && export PATH=`pwd`/bin:$PATH

or just run ./bin/{rake|rails|etc} from your app root.

花想c 2024-12-09 11:43:21

尝试在命令前面加上bundle exec来运行你的服务器,即

bundle exec rails server

或者在生产环境中(如果你使用的是Unicorn之类的东西)

bundle exec unicorn [options]

Try prefixing the command to run your server with bundle exec, i.e.

bundle exec rails server

Or in production (if you're using something like Unicorn

bundle exec unicorn [options]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文