我是在一个Rails 5应用程序的macOS塞拉利昂和一切都进行得很好,直到我准备生产的数字海洋VPS。我使用了一个最著名的部署Rails应用教程,使用了Capistrano,在经历了一些bug之后,我的应用程序终于开始在生产中运行。
现在,在我的本地环境中,当我运行rails server或rails console 时,我得到了警告,我不知道如何修复它,也不知道它出了什么问题。
Looks like your app's ./bin/rails is a stub that was generated by Bundler.
In Rails 5, your app's bin/ directory contains executables that are versioned
like any other source code, rather than stubs that are generated on demand.
Here's how to upgrade:
bundle config --delete bin # Turn off Bundler's stub generator
rails app:update:bin # Use the new Rails 5 executables
git add bin # Add bin/ to source control
You may need to remove bin/ from your .gitignore as well.
When you install a gem whose executable you want to use in your app,
generate it and add it to source control:
bundle binstubs some-gem-name
git add bin/new-executable
=> Booting Puma
=> Rails 5.0.0.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop我一直在搜索这个bug是什么,以及如何修复它,但我没有运气!作为参考,这似乎与Capistrano有关,但我已经做了他们所说的解决方案,它不起作用,或者我没有以正确的方式实现它:
解决办法是: 1.-从
bin中删除linked_dirs(这不是我的情况) 2.-将set :bundle_binstubs, nil添加到config/deploy.rb以生成binstub
我发现了一些文章:
我真的很感激你能为我提供的任何帮助。提前谢谢。
发布于 2017-07-29 15:07:08
我知道这有点晚了,但我发现我可以运行$ rails app:update,它会恢复/覆盖我的本存根.随着覆盖所有其他配置文件,您开始使用。所以小心点。
有关此任务的更多信息,请参见升级Rails指南。
https://stackoverflow.com/questions/40756126
复制相似问题