3

I'm still a beginner in developing Ruby on Rails apps. I've developed a project on my old laptop. And I want to open it on my new one. When I download the project from github, I am not able to perform "heroku open". I receive the following error: "No app specified".

And if I write git push heroku master, it says "Not a git repository".

Can you help me please? Thanks a lot!

firewall
  • 638
  • 1
  • 7
  • 23

4 Answers4

6
  1. Pull the project down from GitHub using git clone
  2. Change into the project directory using cd [project_name]
  3. Install the gems using bundle install
  4. Create the database rake db:create
  5. Run the migrations rake db:migrate
  6. Read this thread on someone with the same error message
  7. Read this thread

Let me know if this solves your problems.

Community
  • 1
  • 1
Powers
  • 18,150
  • 10
  • 103
  • 108
  • Thanks a lot Powers! I followed your steps. And I would like to rollback the older version, which was done 30 days ago. I've tried the solutions offered when searching on Google, but it didn't work. I want to rollback the old version and test it on rails server. Thanks a lot! – firewall Aug 06 '13 at 02:34
1

First create a Heroku app

heroku create

This will create a remote Git repository called "heroku". You can check for this by using

git remote -v

Then, deploy your app to heroku with

git push heroku master

You can get full details on the Heroku Docs: https://devcenter.heroku.com/articles/git

Amy.js
  • 536
  • 4
  • 11
0

Heroku is a cloud server to deploy your app.

On a local box, you could open a rails application by

  1. Cloning your repository
  2. Open terminal, navigate to the project directory
  3. type script/server (if older than Rails 3) or rails server (Rails 3.0 onwards). Ref

This should bring up your Rails application.

If you have a database setup, then you might have to do rake db:create, rake db:migrate and rake db:seed. You need to ensure that the DB is installed and running.

Srikanth Venugopalan
  • 9,011
  • 3
  • 36
  • 76
0

Sounds like you set up your project along with the heroku app on the first machine, however when you clone it to another machine, the heroku remote does not exist anymore.

This is because when you type "git push heroku" you're telling git to look for a remote repo named "heroku" in your config file (/yourapp/.git/config).

To see the current list of remote repos type the following:

get remote -v

If this list does not have your heroku remote AND you have the Heroku Toolbelt installed, you can simply run the below command to re-add the heroku remote:

heroku git:remote -a <app-name>
Nick
  • 290
  • 2
  • 11