【问题标题】:Rails console not launching [I'm in the directory]Rails 控制台未启动 [我在目录中]
【发布时间】:2017-12-31 07:13:20
【问题描述】:

Rails C 和 Rails S 在正确的目录中不工作。

试过了:

$ bundle exec rake rails:update:bin

这会返回以下错误:

bundler: command not found: rails:update:bin
Install missing gem executables with `bundle install`

我跑过:

Bundle Install

这仍然返回相同的错误

已更改目录(更高和更低),重复步骤并尝试推荐以获得相同的结果。

我正在运行 rails 服务器,当我停止服务器并尝试重新启动服务器时,出现了错误,所以我认为这与物理位置更改(可能是 bin 文件)有关,这与当我尝试运行 bin/rails 命令时,我收到以下错误:

bundler: command not found: rails:update:bin
Install missing gem executables with `bundle install`

我已尝试将 bin 文件夹整理如下:

rake rails:update:bin

但是我收到了这个错误:

rake aborted!
Don't know how to build task 'rails:update:bin' (see --tasks)

最后,我检查了物理位置,有一个 .bin 文件,但是这个文件夹是空的,它不在 .gitignore 目录中。

辅助信息 导轨版本:5.1.4 红宝石版本:2.3.4 服务器:heroku 操作系统。 Ubuntu 16.04(通过 virtualbox)。 我没有升级 rails,这是全新安装

我不知所措。

【问题讨论】:

  • 我已经为这个应用下载了我的 bin 文件夹的工作 github 副本,并将它放在现有的空 bin 文件夹上,但这并没有解决问题。
  • 能不能把命令提示符截图
  • 它一直要求你在这里运行bundle install Install missing gem executables with bundle install`,而你正在运行Bundle install

标签: ruby-on-rails ruby console ubuntu-16.04


【解决方案1】:

rails update:binrake update:bin 这些是执行 rake 任务的正确方法。

【讨论】:

  • 尝试了这两种方法都没有效果,rails 仍然只给了我新的应用程序选项,没有别的。
  • rake update:bin 让我 rake 中止,“不知道如何构建任务”
  • @Realitybites 您可以使用rails -T | grep 'your task name' 获取正确的 rake 命令。
  • 丹尼尔,钱,rails app:update 注意到我的 git clone 中的冲突(无论出于何种原因),张贴作为答案,我会标记它是正确的。
猜你喜欢
  • 2013-12-14
  • 2014-08-08
  • 2014-08-06
  • 1970-01-01
  • 2020-01-09
  • 2013-05-04
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多