I have a project with a Vue frontend and a rails backend. It's just a very simple API on the backend, no database or anything. It's working fine locally but now I want to deploy it on Heroku.
However, when I run it I get the following error.
-----> 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
Based on various SO posts/Heroku documentation, I have already tried:
bundle exec rake -P RAILS_ENV=production
- everything looks ok- adding the
rake
dependency in Gemfile - removing the
sqlite
dependency in Gemfile - removing the BUNDLED WITH from Gemfile.lock
But still the same error.
I guess it's related to my database config, but I don't have any database on my project so this seems like an unnecessary task anyway. I tried commenting out railties from my Gemfile but it's still there as a dependency for other gems. When I deploy after making this change, it still hits the same task and fails.
Link to repo branch