Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3997578
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:25:09+00:00 2026-05-20T07:25:09+00:00

I have an existing Rails app on GitHub and deployed on Heroku. I’m trying

  • 0

I have an existing Rails app on GitHub and deployed on Heroku. I’m trying to set up a new development machine and have cloned the project from my GitHub repository. However, I’m confused as to how to link this folder up to Heroku. Originally, I used the heroku create command, but obviously I don’t want to do that this time since it will create another Heroku instance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:25:10+00:00Added an answer on May 20, 2026 at 7:25 am

    Heroku links your projects based on the heroku git remote (and a few other options, see the update below). To add your Heroku remote as a remote in your current repository, use the following command:

    git remote add heroku git@heroku.com:project.git
    

    where project is the name of your Heroku project (the same as the project.heroku.com subdomain). Once you’ve done so, you can use the heroku xxxx commands (assuming you have the Heroku Toolbelt installed), and can push to Heroku as usual via git push heroku master. As a shortcut, if you’re using the command line tool, you can type:

    heroku git:remote -a project
    

    where, again, project is the name of your Heroku project (thanks, Colonel Panic). You can name the Git remote anything you want by passing -r remote_name.

    [Update]

    As mentioned by Ben in the comments, the remote doesn’t need to be named heroku for the gem commands to work. I checked the source, and it appears it works like this:

    1. If you specify an app name via the --app option (e.g. heroku info --app myapp), it will use that app.
    2. If you specify a Git remote name via the --remote option (e.g. heroku info --remote production), it will use the app associated with that Git remote.
    3. If you specify no option and you have heroku.remote set in your Git config file, it will use the app associated with that remote (for example, to set the default remote to “production” use git config heroku.remote production in your repository, and Heroku will run git config heroku.remote to read the value of this setting)
    4. If you specify no option, the gem finds no configuration in your .git/config file, and the gem only finds one remote in your Git remotes that has “heroku.com” in the URL, it will use that remote.
    5. If none of these work, it raises an error instructing you to pass --app to your command.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have managed to run a basic rails app1 on App Engine using: http://gist.github.com/268192
I have an existing mysql db used by a rails app. I want to
I have an existing rails application to which i am adding a new controller
I have an existing Rails internal app, that handles inventory, invoicing, order taking, labeling,
My goal is to deploy an existing Rails app on a machine. Oh, and
I have an existing Rails 2.3.10 app that I'm considering upgrading to Ruby 1.9.2
I have an existing C++ project on a linux environment, and would like to
I have an existing website that uses the same code base, but is deployed
I have an existing web app that allows users to rate items based on
We’ll be releasing shortly a companion Rails application to our existing Rails app. We

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.