我有一个带有Vue前端和Rails后端的项目。它只是后端的一个非常简单的API,没有数据库或其他任何东西。它在本地运行良好,但现在我想在Heroku上部署它。
但是,当我运行它时,出现以下错误。
-----> Detecting rake tasks
!
! Could not detect rake tasks
! ensure you can run `$ bundle exec rake -P` against your app
! and using the production group of your Gemfile.
! rake aborted!
! URI::InvalidURIError: bad URI(is not URI?): ://user:pass@127.0.0.1/dbname
...
...
/activerecord-6.0.2.1/lib/active_record/railties/databases.rake
基于各种SO帖子/ Heroku文档,我已经尝试过:
bundle exec rake -P RAILS_ENV=production
-一切都很好rake
在Gemfile中添加依赖项sqlite
Gemfile中的依赖项但是还是一样的错误。
我想它与我的数据库配置有关,但是我的项目上没有任何数据库,因此无论如何这似乎是不必要的任务。我想从我的Gemfile中注释掉杂项,但它仍然作为其他gem的依赖项。进行此更改后进行部署时,它仍然会执行相同的任务,但会失败。
链接到回购分支