Error: deploying Rails 2.3.8 app to heroku - ruby-on-rails

Would appreciate any insight into how to get my Rails 2.3.8 deployed using Heroku. I am getting the following error message when I try to push to push to heroku:
git push heroku master
Enter passphrase:
Counting objects:3, done.
Compressing objects: 100 % (2/2), done.
Writing onject: 100 % (3/3), 4.34 KiB, done.
Total 3 (delta 0), reused 0 (delta 0)
-----> Heroku receiving push
Heroku push rejected, no Cedar-supported app detected
To git#heroku.com: falling-sunrise.git
[remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:falling-sunrise.git'
I have also attached the actual screenshot of my command line screen. I read somewhere that I may have to write a gemfile to get the push to work. I also did that and added it to the root of my app but no luck.

Can you provide the layout of your app? Make sure to run bundle install locally and to check your Gemfile; it may not be configured correctly, or you haven't added it the new files (including the ever-important Gemfile.lock) to git.
Also see https://devcenter.heroku.com/articles/ruby-support#rails_2x_applications

try bundling your gemfile and making sure it's complete. If that doesn't work, you might try pushing your app to a bamboo stack:
https://devcenter.heroku.com/articles/bamboo

Related

remote rejected master -> master (pre-receive hook declined) heroku

I recieve an error while pushing rails code to heroku.
Counting objects: 20, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (20/20), 1.75 KiB | 0 bytes/s, done.
Total 20 (delta 15), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! Could not complete the action. Please try again later.
remote:
To https://git.heroku.com/dishcuss-api.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/dishcuss-api.git'
I have tried the few methods , including rollback heroku and git pull , but it didn't work for me.
just run the migration on heroku:
heroku run bundle exec rake db:migrate
I see 2 possible solutions to your problem:
It's possible that you didn't run your latest migrations on your Heroku server. In that case do heroku run rake db:migrate.
The other option is that this is caused by their SSL certificate that isn't valid any more as of a few hours ago; they're working on that.

Heroku Deploy Error: No Default Language

I am trying to push some ruby code with git and keep getting stopped part way through. Here is my setup and error I get..
root#slacker:~/ruby# git remote -v
heroku https://git.heroku.com/warm-woodland-27175.git (fetch)
heroku https://git.heroku.com/warm-woodland-27175.git (push)
root#slacker:~/ruby# ls
config.ru myapp.rb
root#slacker:~/ruby# git push heroku master
Counting objects: 4, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 398 bytes | 0 bytes/s, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to warm-woodland-27175.
remote:
To https://git.heroku.com/warm-woodland-27175.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/warm-woodland- 27175.git'
root#slacker:~/ruby#
I am still trying to understand the ins and outs of git but I am pretty lost as to why git doesn't recognize the file extensions in my compilation folder. I thought that was how it fetched what language to use, .rb .pl etc... Any help would be much appreciated.
I had this error when trying to deploy my Sinatra app to Heroku.
heroku buildpacks:set heroku/ruby
I read https://devcenter.heroku.com/articles/buildpacks which helped me finish the solution.
But I started with https://devcenter.heroku.com/articles/rack
which helped me understand the files that you need to add such as the Gemfile etc. Make sure you do the bundle install.
Make sure you committed your changes after you added the Gemfile, etc. So
git add .
or whatever you need to do it then commit
git commit -m "Added files for Heroku deployment"
or change the message as you want. and then can you deploy using
git push heroku master
Now I have my site running using heroku
If I am missing something that you need, just ask in comments so I can clarify.
I had the same issue when I was trying to deploy to Heroku with Ruby Sinatra. The issue in my case was that I'm brand new to Ruby and Sinatra and didn't know anything about the gems and bundling.
I literally only had my app.rb file in the folder.
I took the following steps, based on some guides 1 I read:
If my app is called app.rb, create a file called config.ru:
require './hello'
run Sinatra::Application
Create a file called Gemfile:
source 'https://rubygems.org'
gem 'sinatra'
Then I found this article that reminded me that I need to run bundle install.
Then I add these files to my git, pushed it, and mine is working!

Having trouble pushing an app to Heroku

I'm in the process of pushing a webapp I designed in Rails to Heroku, but I'm having trouble when pushing the app to heroku. According to the console, when it starts preparing the app for the Rails asset pipeline, the rake aborts. At the end I get this error:
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/connectr-demo.git'
I have heard that this is because of conflicts in the commits, but I have already pulled from github and everything is up to date, or at least the console is reporting so. At the recommendation of a similar question, I tried using "git fetch origin" and "git pull --rebase" but got the exact same results. I still get this error when I try to push to heroku. Can anyone tell me how I can fix this?
Is it a fast-forward merge, or do you need to force push?
Try git push -f heroku master...
Have you tried running heroku run rake db:migrate and then try re-pushing to heroku git push heroku master
The (pre-receive hook declined) means that Heroku didn't recognize the app. Make sure that the rails app is in the root directory of the repo not in a sub directory, make sure you have a Gemfile and make sure that it is named correctly.

Rails app not recognized by Heroku

I can't push to Heroku and unfortunately none of the other questions on StackOverflow help.
I'm using Rails 3.0.9 and Heroku doesn't recognize my app as a Rails app.
$ git push heroku master
Counting objects: 378, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (311/311), done.
Writing objects: 100% (378/378), 134.64 KiB, done.
Total 378 (delta 143), reused 107 (delta 12)
-----> Heroku receiving push
-----> Removing .DS_Store files
! Heroku push rejected due to an unrecognized error.
! We've been notified, see http://support.heroku.com if the problem persists.
To git#heroku.com:cold-xyz.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:cold-xyz.git'
The repository's layout was wrong.
My rails app was in a subdirectory of the repository. I set Rails' root directory to the repositories root directory and that fixed it:
git mv subdirectory/* .
Try updating your bundle, and then pushing it again.
Or may have something to do with gemlock file?
Else if all fails, you can remove the .git file and re init again.

Why is Heroku rejecting this git push?

I make a new Heroku app inside of my current app directory using Heroku create and ran this:
MyMac:bodb pawel$ git push heroku master
Counting objects: 359, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (291/291), done.
Writing objects: 100% (359/359), 13.83 MiB | 2 KiB/s, done.
Total 359 (delta 40), reused 0 (delta 0)
! Heroku push rejected due to an unrecognized error.
! We've been notified, see http://support.heroku.com if the problem persists.
To git#heroku.com:myproject.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:myproject.git'
My rails app runs on Ruby 1.8.7 but even a Heroku app on --stack bamboo-ree-1.8.7 fails.
I have also run bundle install and my Gemfile is up to date.
I don't know why the commit was corrupted, but contacted Heroku and they sorted it out.
I had that error once when I changed the Gemfile but did not run bundler and therefore modified Gemfile.lock

Resources