【发布时间】:2017-09-28 00:36:09
【问题描述】:
我正在尝试访问生产环境控制台。我认为 rbenv 惹我生气了。
当我运行 rails console production 时,我得到了旧的:
Usage:
rails new APP_PATH [options]
所以我想,由于我运行的版本,它不会将我的目录识别为 rails 应用程序。所以 rails -v 告诉我:
deploy@webb-labb2:~/prognoser/current$ rails -v
Rails 5.1.0
哪个是错误的应用版本。 bundle exec rails -v 命令给了我:
deploy@webb-labb2:~/prognoser/current$ bundle exec rails -v
Rails 4.2.8
哪个是正确的版本。但是:
deploy@webb-labb2:~/prognoser/current$ bundle exec rails console production
仍然给我旧的:
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH]
【问题讨论】:
-
所以这与问题有关。尽管我已经在 bundle 下运行了命令。不是捆绑执行。因此,它为错误的 railsversion 生成了 binstubs。
标签: ruby-on-rails bundler ubuntu-16.04 rbenv