Heroku installing app sushi , push db to Heroku - ruby-on-rails

I'm trying to upload my db dump file to Heroku to manage the website. It's a static file. When I follow the instruction given in Heroku site, I got errors. I might get it wrong so want to be clarified by many experts. Please help me!
What is the app sushi? I kept trying to push my db dump file to Heroku server. All configuration is set.
This is a command I put.
$heroku pg:push outfile HEROKU_POSTGRESQL_MAUVE --app sushi
This is a result I got.
You do not have permission to view resources for sushi.
You need to have the deploy privilege on this app.
When I command
$heroku config
AWS, DATAbase URL, Bucket name etc are well set. Many commands I see from this link https://devcenter.heroku.com/articles/heroku-postgresql and none of them worked to me because I don't have a permission to app sushi. How can I get the permission?

sushi is just the example app name given for reference , please replace sushi with the actual name of your application.

Yes, it is confusing. Like "infused" commented, "sushi" is an example app name, you should replace that with the app name you have.
If your app name is "apidata", then you should write:
$heroku pg:push outfile HEROKU_POSTGRESQL_MAUVE --app apidata
You can find your app name in the app menu and in the url like this:
https://dashboard.heroku.com/apps/apidata
being "apidata" your app name.
Kind of late, but might help future doubts since this tutorial is still this confusing.

Related

Have two actioncables /cable web socket servers?

I'm getting some errors on my rails app that's doing a lot of cross domain stuff, and i'm trying to find a minor fix for this.
Is it possible to have multiple /cable url's inside the production file so that it uses both or whichever works?
example code:
config.web_socket_server_url = ['wss://example.herokuapp.com/cable', 'wss://www.example.com']
i've tried this, but unfortunately it doesn't work.
If you are using two heroku app, you can store the url of you app to a environment variable and reference that variable in you configuration. First in you terminal
heroku config:set -a YOUR_APP_NAME RAILS_HOST="YOUR_APP_URL"
then set the configuration
config.web_socket_server_url="wss://#{ENV['RAILS_HOST']}/cable"
If your second app is not a in-app case, then your should store complete url for both apps and use
config.web_socket_server_url=ENV['RAILS_HOST']

Heroku rails blogger not processing login

So I push my rails_blogger app to Heroku and it goes fine, I run rake db:migrate and it goes fine, but then when I try to login using the email and password I made, it doesn't let me login and just renders the login page again.
When I run webrick on my computer everything works fine with login, but when I access the app from the heroku URL in my browser, it won't let me login!
Also, it won't even show the articles on the main page that anyone should see, logged in or not.
I've looked all over various google search results to find the answer to this to no avail.
Can someone help me understand the problem here?
GitHub repo: https://github.com/ck626/project_rails_blogger
Heroku page: scary-goblin-6551.herokuapp.com
The database that you use at heroku are different from your local database, so you need to create authors separately on heroku and at your local development server. In Rails you can configure your database (what database to use at production and at development) at config/database.yml.
Another thing to note heroku does not support sqlite, you need to use pg instead.

Rails Tutorial: Why can I sign up a new user without problems on the local server but not on Heroku?

I've completed the Rails Tutorial. I kept up with every detail until the end of chapter 8. The last four chapters I just copied and pasted without trying to understand much.
The Sample App works perfectly on a Cloud9 local web server, but not on Heroku. Specifically, When I want to sign up a new user, I get the message "We're sorry, but something went wrong."
Why can I sign up a new user without problems on the local server but not on Heroku? Is the functionality of the final sample app supposed to be exactly the same on both local and heroku?
You are getting a 500, look at the server logs for a clue. Probably need to run migrations.
Run your migrations:
heroku run rake:db migrate
You may need to restart heroku:
heroku restart
If it still doesn't work, try resetting your database. If you're using postgres, try:
heroku pg:reset DATABASE
I completed every step in the entire Rails Tutorial book, except one, which I thought was optional and wouldn't affect the result in production.
10.3 Email in Production shows you how to configure your application to send emails in production (for account activation in the book's sample application) using a Heroku add-on called Sendgrid.
You do have to give Heroku credit card information (though for the purposes of the book you don't have to actually make any purchase or subscription), and this is why I initially didn't implement this section of the book.
After following along and implementing section 10.3 my final application is fully functional in production.

Renaming Heroku App for Custom Domain

I'm about to rename my Heroku app from the default one that it started with - just some jibberish, really - to something that's a little more sensical. I'm also about to wire it up with a custom domain. Is changing the app name going to cause any problems? I've read the docs and it seems like it'll be okay but wanted to ask to be sure that there weren't any namespace issues, etc. Thanks!
If you have already configured custom domain on Heroku app. And then changed the name of the application on heroku, then you will need to update the required CNAME and A record which are pointing to earlier.herokuapp.com
If you haven't added the custom domain yet, rename the app first, then add the domain.
Good luck
You can use command line also just use below command from your project folder, by below command you no need to point to new from your git. It will automatically update your git too.
heroku apps:rename NEWNAME --app APP
NEWNAME is your new name for your heroku app
APP is old name already existing one.
If you don't know exatly the old name then you can able to view list of names and their addresses by below command
git remote -v

Heroku app url made out of random words

I'm new to rails and heroku, and this may very well seem like a daft question, if so I appologise, but would appreciate someone at least telling me so.
I've followed the heroku "getting started" guide, and managed to deploy a copy of the rails default project. But the url preovided by heroku was http://radiant-ice-84.heroku.com, my question is this:
Does heroku assign a randomly generated url, or have I done something wrong because I don't recognise radiant-ice-84?
Before you closing this question, I would like to say that you in fact could specify the first when you create the app (no need to change again in the setting page) by using:
heroku create your-app-name
If you don't specify a name, Heroku generates one for you. You can change it in your app settings (as you noticed), although a lot of people just buy a domain name and map it to the Heroku-generated name.

Resources