Ruby on rails 如何跳过Rails 6中现有项目的活动记录
我有一个现有的Rails项目,我是在API模式下创建的,没有使用DB。在尝试部署到Heroku时,我遇到了很多与ActiveRecord相关的错误Ruby on rails 如何跳过Rails 6中现有项目的活动记录,ruby-on-rails,ruby-on-rails-6,Ruby On Rails,Ruby On Rails 6,我有一个现有的Rails项目,我是在API模式下创建的,没有使用DB。在尝试部署到Heroku时,我遇到了很多与ActiveRecord相关的错误 -----> 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
-----> 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
要在现有项目中复制
跳过活动记录
设置,请执行中的步骤
加上
删除config/environments/development.rb->config.active\u storage.service=:local
删除config/environments/production.rb->config.active\u storage.service=:local
删除config/environments/test.rb->config.active\u storage.service=:local
删除bin/setup->put“\n==准备数据库==”
系统!”bin/rails数据库:准备“
删除config/storage.yml
删除test/test\u helper.rb#按字母顺序在test/fixtures/*.yml中为所有测试设置所有装置。
固定装置:所有