【问题标题】:rails c wont work in app directoryrails c 在应用程序目录中不起作用
【发布时间】: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]

【问题讨论】:

标签: ruby-on-rails bundler ubuntu-16.04 rbenv


【解决方案1】:

我跑了

$ bundle exec rake rails:update:bin 

成功了。而且我必须在 shared/config 目录中添加一个引导文件。

【讨论】:

    猜你喜欢
    • 2014-06-18
    • 2018-11-08
    • 1970-01-01
    • 1970-01-01
    • 2018-06-09
    • 2014-01-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多