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.
Related
So I believe that I have searched on here and not found any question that pertains to my issue so hopefully someone can guide me. I was required (for a course) to create a Ruby scaffolding "products" page. My page links all worked on the local host rails server but when I tried it on Heroku (also required) all the links work EXCEPT the new product page.
I have exhaustively googled but I must admit that all the computer lingo is new to me so I am unsure what any of it means and of what steps are safe. For the reason that if I make things worse, I will never know what to look for to reverse anything. I have included the error that shows up in Heroku. When I searched that I found many different answers causing me to be unsure which is correct.
If anything else is needed just let me know. Many thanks to any and all that reply!
Error on Heroku
The error says, "relation products" does not exist.
Did you make sure to run heroku run rake db:migrate ? After you migrate you'll need to heroku restart
This gets me a lot as part of my Heroku deployments, so I make sure to write a script or rake task which does the git push to deploy to Heroku, then runs these two commands. Then I always use that script to deploy, instead of manually doing a push.
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.
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
I have developed a RoR app. I would like to update it to handle more than one customer. For instance, one customer might use ame.requestsys.com and another would be slc.requestsys.com.
Currently on Heroku, I have requestsys.com and www.requestsys.com
I was told that I need to have *.requestsys.com --> is that correct?
If yes, why won't Heroku let me add it?
Thanks
From the command line in the directory of your app do:
$ heroku domains:add *.requestsys.com
You can also do it from the heroku dashboard.
Then setup a CNAME in your DNS accordingly to point to yourapp.herokuapp.com
Try this guide for more info: https://devcenter.heroku.com/articles/custom-domains#wildcard-domains.
Basically what you wanna do is a multitenant app, there are a couple railscasts on the subject:
http://railscasts.com/episodes?search=multitenancy
But thats beyond the scope of the question.
I recently did Heroku's requested database migration from a "shared database" to Postgres. I followed Heroku's directions carefully, and it all went fine until the last step: removing the old shared database. At that point, my app went down with the "something went wrong" message, and it's been down ever since (going on two weeks now).
Note that the app was still working after the step in which I switched to the new database, and according to "heroku config", it is using the new database. It shouldn't care about the old one disappearing. The logs say nothing other than 500 errors.
I submitted an urgent support request to Heroku, but they were not helpful. They just said that my data is still there but, "Your application isn't logging so it's not clear why this is happening but it doesn't appear to be due to the migration." That was a week ago, so it's not looking like they're going to do anything more.
I agree that the problem shouldn't be due to the migration, but given that I've made no changes to the app except the migration, and that it died exactly when I removed the old database, I don't see what else it could be.
My app is probably pretty old at this point (Rails 3.0.3), so my only thought now is to update everything to the latest versions and redeploy. The app is used to record merit badges and rank advancements for our local Boy Scout troop, so I really need to get it running again. Any advice would be greatly appreciated.
My first instinct would to db:pull the heroku hosted database. (make a copy).
Then try to start your app locally.
Heroku has fixed the problem. My hypothesis was correct: my app was so old that the migration procedure did not actually update it to use the new database. They say that they'll be applying the fix to their other old apps now.
If the app started failing the moment you removed the shared database, it means that your app was still connected to this database and was never connecting to the new one. It sounds to me like you did not run heroku pg:promote HEROKU_POSTGRESQL_<color of new database> --app <your-app>. Can you try that?
Edit:
Based on the further info provided in your comments, it's possible that this is a potential issue in the aspen and bamboo stacks (that only affect a few customers). The thing to try now is a new deploy. Try making a trivial change - maybe a newline in your project README - and deploy the app again. This will force a slug recompile that will write out a new database.yml using the correct DB.
Even better would be to migrate to the cedar stack though