"Resource not found" for Heroku PG commands - ruby-on-rails

I got a free Heroku account and I'm working with:
Rails 3.2.8
Heroku heroku-toolbelt/2.33.2
PG
But, each time I'm typing a Heroku PG commands, I got this message:
Resource not found!
Except for the credentials command:
➜ heroku pg:credentials HEROKU_POSTGRESQL_MYDB
Connection info string:
"dbname=blahblahblah"
Else, all others command fail:
➜ heroku pg:info HEROKU_POSTGRESQL_MYDB
! Resource not found
➜ heroku pg:reset HEROKU_POSTGRESQL_MYDB
WARNING: Destructive Action
This command will affect the app: myapp
To proceed, type "myapp" or re-run this command with --confirm myapp
> myapp
Resetting HEROKU_POSTGRESQL_MYDB_URL (DATABASE_URL)... failed
! Resource not found
➜
Any ideas ?
If you need more information, tell me :)
Thanks!

Previously, there was some issue with heroku gem version(2.26.6) and this Resource not found occurred, but it gets fixed in the latest versions.
There is no problem with the current version what you are using.
Your heroku keys will be invalid(Trying to set up a heroku staging site - "Resource not found ").
If it is correct, you need to downgrade the heroku gem and check it.
Please follow this thread.
It will help you to fix the above issue.

Related

Unable to deploy rails test app to Heroku

I'm working through the odin project's web development course and I'm getting tripped up on the last part of the installations project where you are tasked with deploying a rails app to Heroku. I've been working on this for about a week but I refuse to give up but I realize that I need some help.
Here's the link to the tutorial I'm trying to work through (on a mac):
http://installfest.railsbridge.org/installfest/deploy_a_rails_app
I have a Heroku account set up, and am running Ruby 2.3.0 and rails 4.2.5.1. Rubygems are at 2.6.1 (but I tried them at 2.5.1 too).
Everything works fine but when I get to heroku run rake db:migrate I always get the time out error:
[~/railsbridge/test_app] ruby-2.3.0 $ git push heroku master
Everything up-to-date
[~/railsbridge/test_app] ruby-2.3.0 $ heroku run rake db:migrate
Running rake db:migrate on powerful-journey-35824... up, run.9421
▸ ETIMEDOUT: connect ETIMEDOUT 50.19.103.36:5000
I saw another post suggesting that the problem is a result of the connection I'm using blocking port 5000 (I'm at a library). I checked port 5000 on canyouseeme.org as well but it also timed out.
I then tried deploying the app detached using heroku run:detached rake db:migrate and it seems to work until I open heroku again and it shows that the page I'm looking for doesn't exist.
Basically what I'm asking is, does anyone have any idea why this test app isn't getting pushed from my terminal to the heroku deployment page?
I'm a python/django guy, but taking a guess the "everything up to date" message is likely because you have not commited your changes to git. Try:
git commit -a
git push heroku master
Now run your rake command.

coding with heroku and some addones and sendgrid function

Hi i am doing some coding with heroku and now i am running with some problem more specifically using this code in my terminal
sudo heroku addones:add sendgrid:starter --app project1
end result
Adding sendgrid:starter on project1... failed
! You do not have access to the app project1.
I am a bit new with ubuntu and ruby on rails so i dont have any god idea with this exept with ssh but my main problem is why and how any info or help would really be appreciated
Make sure you're logged into the account that owns/has permissions to project1 by running:
heroku login
Also, you have a syntax error in your command, should be:
heroku addons:add sendgrid:starter --app project1

Heroku pg:info and pg:psql "Not found"

I'm not sure what has happened to my heroku postgres but when I try to access it with command line with pg:info and pg:psql, I get "Not found".
I even clicked on the button on heroku to create a database for my app as well.
How do I debug this? What can I try? I don't mind starting from scratch since it's for testing.
It wants the psql installed and avalibale on the command line on your local machine. On Ubuntu, I ran sudo apt-get install postgresql-client . heroku pg:psql then worked straight away.
Try passing the appname or database name explicitly. The heroku cli tries to infer your application name from the 'heroku' git remote but if it can't find that it just returns the Not Found message.
eg;
heroku pg:info --app appname
If you are one OS X you should install postgres like this :
brew install postgres
See this. May be the same reason.
Heroku postgres not found

Application Error rails app on heroku

I have uploaded my app to heroku, its a simple app to test a login, it uses a gem named sorcery, but when I test it on heroku, I get Application Error
To upload to heroku I only have do this sequence:
git init
git add .
git commit -m "init"
heroku create
heroku push heroku master
heroku rake db:migrate
I get this error:
rake aborted!
undefined method `sorcery' for
#<Rails::Application::Configuration:0x0000000266e660>
)
Please help me, I think that the gem sorcery is causing this problem, but I dont know what to do.
You can see the website here
Does this work on you localhost?
I see form your list of commands that
bundle install
is not there.
Make sure you have
gem "sorcery"
in your gem file
Then do
heroku login
and
bundle install
You'll probably get other errors. Go to Getting Started with Rails 3.x on Heroku and follow the instructions.

heroku run rake db:migrate failed: command not found

I'm a novie in heroku. When I was performing my CS169.1x homework2 (deploying an application) I ran into a problem with database filling using the following command: heroku run rake db:migrate. Here is terminal dump:
saasbook#saasbook:~/Documents/hw2_rottenpotatoes$ git pull heroku master
From heroku.com:afternoon-cove-7289
* branch master -> FETCH_HEAD
Already up-to-date.
saasbook#saasbook:~/Documents/hw2_rottenpotatoes$ git push heroku master
Everything up-to-date
saasbook#saasbook:~/Documents/hw2_rottenpotatoes$ heroku run rake db:migrate
heroku run rake db:migrate: command not found
saasbook#saasbook:~/Documents/hw2_rottenpotatoes$
What may be wrong? If there is error dump on heroku to check?
Have you installed the heroku gem? If you have heroku in the gemfile, you may need to do
bundle exec heroku run...
just to make sure you have heroku installed, what happens when you run:
$heroku help

Resources