Heroku db: pull Taps Load Error: there is no such file to load - pg

I got the following errors using ruby ​​1.9.2-p320 using Heroku Taps commands using the "db" commands, for example:

heroku db:pull --app my-app 

Which causes errors, such as:

 Taps Load Error: no such file to load -- sqlite3 

-or -

 Taps Load Error: no such file to load -- pg 

(And yes, by the way, I have all the right gems, including post-congresses - they work fine locally - and sqlite3, as well as removed, reinstalled and updated the taps and jewels of the hero, including them as well as not including them in my Gemfile I am running Rails 3.2.6)

Although there is a known bug that leads to a "time zone offset" error: heroku db: push not working using gaps taps , I have not seen any SOs that directly solve this problem.

+6
source share
4 answers

The solution I found using the tips https://github.com/ricardochimal/taps/issues/92 is described in detail here: https://github.com/ricardochimal/taps/issues/92#issuecomment-6486535

In short, this is what Ruby 1.9.2-p320 seemed to be a problem as far as I can tell. Switching to ruby ​​1.9.2-p290 fixed it for me. This may be due to the problems of Ruby 1.9.3, which were mentioned above by reference, not sure.

If you are still hanging there with taps, see this comment in GH , as it seems to be even more thorough than me or me.

I will also repeat here that if you do not need cranes, then the protagonist is your friend. See Ryan, answer my question here and his excellent blog post about using a newer tool.

+2
source

Waste is no longer the recommended tool to use when transferring data between postgres instances. Instead, try heroku-pg-transfer .

This will only work if you use one of the production databases or the new herou postgres design or basic plans . If you are still in an older plan for a shared database, I would suggest switching to a new developer plan.

First find the URL of your db on Heroku:

 $ heroku config:get DATABASE_URL postgres://yada: yada@ec2-107-21-122-141.compute-1.amazonaws.com :5432/123 

Then go from heroku db to local db:

 $ heroku plugins:install https://github.com/ddollar/heroku-pg-transfer $ heroku pg:transfer -t postgres://localhost/dbname -f postgres://yada: yada@ec2... /123 

Since the heroku-pg-transfer tool uses the built-in pg_dump postgres function, it is a much more predictable and robust tool.

I already wrote about this in more detail: Using heroku pg: porting to migrate Postres databases

+15
source

My solution was to add the taps gem and sqlite3 gem (even if I don't use sqlite anywhere in the application) in the gemfile (in development).

+2
source

According to @likethesky, you can downgrade. Alternatively just

 ~/.rvm/bin/ruby-1.9.2-p320 /usr/bin/heroku db:push 

Of course, this requires installing p320 with labels set and sqllite3. Easy enough to install.

+1
source

Source: https://habr.com/ru/post/918685/


All Articles