Heroku Push Rejected for Rails 2.3.5 - heroku

I am trying to push my app up to Heroku, but am getting rejected. Here is the error message I'm getting.
Counting objects: 63, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (56/56), done.
Writing objects: 100% (63/63), 80.06 KiB, done.
Total 63 (delta 10), reused 0 (delta 0)
-----> Heroku receiving push
! Heroku push rejected, no Cedar-supported app detected
To git#heroku.com:agile-shelf-2850.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:agile-shelf-2850.git'
My app is the simple hello world app and I am using the following:
Rails 2.3.5
Ruby 1.8.7
Gems 1.4.2
I've research the site and found others that have this problem but they are using Rails 3. Example: Heroku push rejected, no Cedar-supported app detected
Any ideas? I'm using these older versions as the project i'm trying to integrate into is using these versions so i'm trying to stay consistent.

You need to move your config.gem lines in your config/environment.rb to a Gemfile and install bundler. Rails 2.x does not have inherent support of Bundler and Cedar requires that you use Bundler to specify your app's gem dependencies. Otherwise it will not see your app as a Rails app.
Install Bundler for Rails 2.3 via:
http://gembundler.com/v1.3/rails23.html
If you have further problems afterwards let us know!

Related

ruby how to create gemfile / gemfile.lock

I am hobbyist coder. I created a twitch chat bot and now am trying deploy it Heroku. I wrote this code with ruby without rails and I don't have any gemfile or etc. its works fine on my machine but I don't know how to create for Heroku
I tried like that and I had this error:
Enumerating objects: 18, done.
Counting objects: 100% (18/18), done.
Delta compression using up to 16 threads
Compressing objects: 100% (14/14), done.
Writing objects: 100% (18/18), 4.87 KiB | 997.00 KiB/s, done.
Total 18 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/ruby.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to stormy-refuge-29575.
remote:
To https://git.heroku.com/stormy-refuge-29575.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/stormy-refuge-29575.git'
github link:https://github.com/sydneyfunnelAIO/twitch-bot
All the gems that you are using in your application should be present in the Gemfile. The reason why the app is running on your computer might be that you have those gem installed globally.
Because you are using rufus-scheduler, selenium-webdriver gems, both should be present in the Gemfile, that should look like this:
source 'https://rubygems.org'
gem 'rufus-scheduler'
gem 'selenium-webdriver'
Once your Gemfile exists, run command bundle install that will install the gems and create Gemfile.lock file.
If it's in ruby you just need to do
bundle install

Heroku rejecting my app all of a sudden (env: bundle: No such file or directory)

I tried deploying my application today and my deployments are for the first time being rejected.
My deployment output is below. I've tried the following with no change in outcome:
Deploying with no Ruby version in Gemfile
Deploying with 2.1.0 in Gemfile
Deploying using a custom BUILDPACK_URL at https://github.com/heroku/heroku-buildpack-ruby.git
Deploying from a different branch
Deploying from a teammate's machine
Rolling back to last successfully deployed commit, changing a line in the README, committed and redeployed.
I had successfully deployed just last night. I only have made HTML and CSS changes to the new code I want to commit, so nothing in the app settings has been changed since the last successful deployment.
Why would Heroku be now rejecting my app deployments?
Thanks!
Fetching repository, done.
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 496 bytes, done.
Total 6 (delta 5), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.5.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
env: bundle: No such file or directory
Bundler Output: env: bundle: No such file or directory
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:myapp.git
! [remote rejected] development -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:myapp.git'
Heroku dropped support for Rails 1.9 and that was in the PATH. I had some trouble dropping the PATH because heroku had some hack where it was configured, but would not drop (probably because it was a default).
So I ended up setting the PATH to something
heroku config:set PATH=blah
and then unsetting it.
heroku config:remove PATH
That seems to have stuck.

trying to deploy app to heroku recieving error everytime

i am currently trying to deploy an app to heroku
https://github.com/Shopify/dashing/wiki/How-to%3A-Deploy-to-Heroku
I am following these instructions exactly
bundle install
git init
git add .
git commit -m "My beautiful dashboard"
heroku apps:create myapp
git push heroku master
and receive this error everytime
git push heroku master
Counting objects: 441, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (225/225), done.
Writing objects: 100% (441/441), 503.88 KiB | 445 KiB/s, done.
Total 441 (delta 170), reused 441 (delta 170)
-----> Heroku receiving push
-----> Ruby app detected
!
! Gemfile.lock is required. Please run "bundle install" locally
! and commit your Gemfile.lock.
!
! Heroku push rejected, failed to compile Ruby app
you don't have a Gemfile.lock file
try
bundle install and then git commit -am "message you wanna put here"
as mentioned below, check the gitignore and remove /Gemfile.lock and the commit again may resolve your problem

Gemfile.lock not checked in - Heroku × 45807

Get the same problem as in (7) and tried all the possible answers but still couldnt get any headway. I wish you could be of help (bearing in mind that i am a newbie please). Here is the description of the problem # hand:
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 403 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
-----> Heroku receiving push
-----> Rails app detected
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
Windows Gemfile.lock detected, ignoring it.
You have modified your Gemfile in development but did not check
the resulting snapshot (Gemfile.lock) into version control
You have added to the Gemfile:
* source: source at vendor/engines
* source: git://github.com/Dougui/refinerycms-portfolio.git (at master)
* source: rubygems repository http://rubygems.org/
* sqlite3
* rake (= 0.8.7)
* refinerycms (~> 1.0.3)
* refinerycms-i18n (~> 1.0.0)
* fog
* refinerycms-portfolio
* refinerycms-geolocations (= 1.0)
* nokogiri
You have changed in the Gemfile:
* refinerycms-portfolio from `git://github.com/Dougui/refinerycms-portfol
io.git (at master)` to `no specified source`
* refinerycms-geolocations from `source at vendor/engines` to `no specifi
ed source`
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
To git#heroku.com:vivid-rain-722.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:vivid-rain-722.git'
Thanks
Based on the error, your gemfile.lock is not the same as the one in repository.
Try doing the following steps.
bundle install
git add gemfile.lock
git commit -m "Add gemfile.lock"
git push heroku master

Error Pushing To Heroku, Rails3 beta4

i'm getting an error when pushing to heroku using rails 3 beta 4. i've
managed to deploy before using it but for some reason i'm getting a
strange error now.
I'm on os x, snow leopard. I've been using rvm with both 1.9.2 preview
and head, i also just reverted back to the system ruby 1.8.7 -p254 but
they all give me the same error:
--------------------------------------------------------------------------- --------------------------------------------------------------------------- --------------------------------------------------------------------------- ---------------------
git push heroku master
Counting objects: 334, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (285/285), done.
Writing objects: 100% (310/310), 48.73 KiB, done.
Total 310 (delta 119), reused 0 (delta 0)
-----> Heroku receiving push
-----> Rails app detected
-----> Gemfile detected, running Bundler
Unresolved dependencies detected; Installing...
.........
.........
INSTALLS/BUNDLES ALL THE GEMS AND EVERYTHING WORKS FINE UNTILL HERE:
.........
.........
Your bundle is complete! Use `bundle show [gemname]` to see where a
bundled gem is installed.
Locking environment
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/
tar_input.rb:49:in `initialize': not in gzip format
(Zlib::GzipFile::Error)
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/package/
tar_input.rb:49:in `new'
.........
.........
MORE STACK TRACE HERE:
.........
.........
error: hooks/pre-receive exited with error code 1
To g...#heroku.com:hostelizer.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '...#heroku.com:hostelizer.git'
--------------------------------------------------------------------------- --------------------------------------------------------------------------- --------------------------------------------------------------------------- ---------------------
Any ideas would be gr8 as i'm not a guru with ruby/rails.
Cheers.

Resources