production.rb wasn't pushed to heroku - railstutorial.org

Ok, I've just finished chapter 10, and was hoping to see the email sent from the production to my gmail account when I tested the "forgot password" logic.
It didn't work. I know why, but I'm not sure how the two versions of production.rb got out of sync.
Now I'm on the (master) branch for sample_app, and I'm getting these messages when I try to push...
abundantmind:~/workspace/sample_app (master) $ git push
Everything up-to-date
abundantmind:~/workspace/sample_app (master) $ git push heroku
Everything up-to-date
abundantmind:~/workspace/sample_app (master) $
Which confuses me, because the relevant lines in the production.rb file look like this...
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
# host = '<your heroku app>.herokuapp.com'
host = 'serene-dusk-31281.herokuapp.com'
config.action_mailer.default_url_options = { host: host }
ActionMailer::Base.smtp_settings = {
And on heroku, the same section of production.rb looks like this...
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
Now my questions...
1) Why does git tell me everything's in sync when it clearly isn't?
(Actually, I'm pretty sure git doesn't lie, so I accept that the issue is between the keyboard and the chair)
and
2) What's the easiest way to push just the production.rb up to heroku (and bitbucket) so that I can move forward with Chapter 12?

Have you merged your branch to master?
if not run this
$ git merge account-activation-password-reset
First do the new commit on push all files on github or bitbucket whichever you are using
$ git push origin master
then try to deploy your application again on heroku and migrate it again.
$ git push heroku
$ heroku run rake db:migrate

Related

Fatal: master cannot be resolved to branch

Here's a screenshot of what I'm dealing with:
I'm a new GitBash user and am getting this error when trying to push to GitHub.
I was following this tutorial. So far I've not run into any problems, except I get this error when I try to push:
Fatal: master cannot be resolved to branch
Things I've done correctly:
I am signed in
I have specified my name and email using git config -global... *blah blah*
Everything is committed and should be ready to push
I'm on the master branch that I wish to push.
I've added my remote repository using command git remote add origin https://github.com/Tawnwen/MyApp.git.
I tried to push using the command git push -u origin master
Can anyone please help?

Git throws out-of-memory error after logoff from the server

I have an issue that I can't seem to be able to solve...
I want to use GutHub to develop a web-app with joomla locally and push my changes to the server everytime I feel like it.
It works great but after I log off the server I get an error that remains, even if I raise the memory limits per config:
fatal: Out of memory, realloc failed
I'm not an expert since I'm still starting to use GitHub, but these are my steps and maybe you have an advice for me...
(on the 1and1.com server)
I start on the server, installing a fresh joomla 3.7.4 and copy the .gitignore from git//joomla/joomla-cms into my webroot-directory, ignoring all core files.
(server)
git init
git config receive.denyCurrentBranch false
cat << EOF >> webrootdir/.git/hooks/post-receive
#!/bin/sh
GIT_WORK_TREE=webrootdir git checkout master -f
EOF
chmod 755 webrootdir/.git/hooks/post-receive
(local computer, cloning into local dir called webroot)
git clone ssh://password#account.1and1-data.host/homepages/11/123456789/htdocs/webroot webroot
(local)
do some work
(local)
git add . && git commit -m "Joomla 3.7.4"
git push
(server)
git checkout -f
I repeat steps 5 and 6 all day long, it works as expected and the files on the server are being updated everytime I repeat the steps.
When I logoff the server or being logged of after some time, the server locks into the error, no matter if I try to checkout or just call git status.
My biggest files are around 250kB (jpegs), I don't manage databases over git, it's just a template folder I'm working on that's being updated, so I can't really figure out what I'm doing wrong :-/
Any advice would be very much appreciated,
Thanks!
I was able to fix the issue with
git config --global core.preloadIndex false

Use two github account in a computer

I have two github account--tuomao and maomao1234,my computer global config user.name is tuomao and I add an ssh key to my computer for tuomao. I use maomao1234 to create a repository Hospital.
Then I clone it into my computer. I have change this repository setting with following instruction.
git config user.name maomao1234
git config user.email myemail
Then I edit some file of the repository and commit my changes,here is my commit log
tuomao#TUOMAO-PC /k/桌面资料/code/temp2/Hospital (master)
$ git log
commit 5a35e6dad5caf21c482db9e5e7fd62e01ee2b807
Author: maomao1234 <944925840#qq.com>
Date: Fri May 6 11:51:55 2016 +0800
from the log,we can see that my commit user is right.
However,when I use git push to push my commit,it happens error
$ git push https://github.com/maomao1234/Hospital.git
remote: Permission to maomao1234/Hospital.git denied to tuomao.
fatal: unable to access 'https://github.com/maomao1234/Hospital.git/': The requested URL returned error: 403
form the error log,we can see the push user is not right.Why I have already change the repository user and the commit user is right but the push user is fault?
how can I push my changes with user maomao1234?
git push https://... means your ssh keys are completely ignored, since you are using the https protocol.
from the log,we can see that my commit user is right.
This has nothing to do with the account used to push: you can create any commit with any git config user.name and still be able to push (with https or ssh) to a repo, provided you use, at push time, the right account or ssh key.
Check git remote -v to see exactly what remote url is used.
An https one should ask you for a user and password.
An ssh one means you need to make sure %HOME%\.ssh\id_rsa.pub is the key associated to maomao1234 and not tuomao.
If you need to manage multiple ssh keys, see "How to work on personal GitHub repo from office computer whose SSH key is already added to a work related GitHub account?".

Git hub pushing to a forked repo

I'm new to github and I couldn't seem to find a solution to my problem, so bear with me a little.
I'm trying to push changes that I've made to a forked repo via command line on an ec2 ubuntu instance from aws. After making changes to my file, I committed the file I changed and then pushed it over to git:
ubuntu#ip-172-31-33-24:~/bitstarter$ git push origin master
Username for 'https://www.github.com': edasaur
Password for 'https://edasaur#www.github.com':
fatal: Authentication failed
I'm hypothesizing that this might be an issue with the fact that I'm pushing over to a forked repo because when I attempted to commit and push changes over to a repository that I started, it seemed to work. However, I'm at a loss at what to do. When I tested whether my SSH key worked via the command:
ubuntu#ip-172-31-33-24:~/bitstarter$ ssh -T git#github.com
Hi edasaur! You've successfully authenticated, but GitHub does not provide shell access.
Thanks in advance!
First, you are pushing using an https address, so any ssh settings you might have won't have any bearing on the completion of the (https) push.
Second, the right https url you should use is:
https://edasaur#github.com/edasaur/bitstarter.git
(no need for www.github.com)
(I like to put the username in the url: that is one less data to enter when pushing)
That means you can set your url with:
git remote set-url origin https://edasaur#github.com/edasaur/bitstarter.git
Third, double-check your password (and see if there is any special character in it like an '#', which might not be directly supported over an http query)
If nothing works, you can still fallback on ssh url:
git remote set-url origin git#github.com:edasaur/bitstarter.git

I can't add file or change file to github.com

I've created an account for github,and set up ssh at home and at my workplace. now I just want to renew and add files so that I do some operation like this:
jty#CVICSE-0E662498 ~/front-end-learn (master)
$ git remote add origin git#github.com:jtyjty99999/front-end-learn.git
jty#CVICSE-0E662498 ~/front-end-learn (master)
$ git push - u origin master
ssh:github.com:noaddress associated with name
fatal: The remote end hung up unexpectedly
I failed T_T. At my workplace I used proxy to connect to Internet, does it matter? How can I solve this problem? thanks everyone cordially.
I think you are inputting the command wrong, I believe it is supposed to be this
git push -u origin master
(no space after the '-')
and you can double check the proper address by using
git remote -v
edit: you also have to use the commands commit and add to actually tell git what to push
here is more info