When I push to heroku, it tells me that it fails to install gems with bundler and then it fails:
Git error: command `git fetch --force --quiet --tags 'git#github.com:holgersindbaek/streama.git' "refs/heads/*:refs/heads/*"` in directory /tmp/build_2e6gwsce8rtbt/vendor/bundle/ruby/1.9.1/cache/bundler/git/streama-bb31e974eacf3e56d77c4899ae1e3687c8245251 has failed.
If this error persists you could try removing the cache directory '/tmp/build_2e6gwsce8rtbt/vendor/bundle/ruby/1.9.1/cache/bundler/git/streama-bb31e974eacf3e56d77c4899ae1e3687c8245251'
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
To git#heroku.com:afternoon-spring-7047.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:afternoon-spring-7047.git'
It suggest that I remove the stream-chace, but I have no idea where that is.
Has anyone tried this before?
I'm on Rails 3.2.2, running MongoDB with Mongoid.
UPDATE:
I'm using ruby 1.9.3, so I think it's a bit funny it points me to a ruby 1.9.1 folder. Don't know if that has anything to do with it?
You're using the private git link for that repository:
git#github.com...
rather than:
git://github.com...
Because the Heroku shell isn't authorized to "privately" clone that GitHub repository, attempting to run bundle install on Heroku will fail. Change that link to the public clone URL.
Related
I am trying to push the first version of a Ruby on Rails app to Heroku.
When I run git push heroku master the errors I get are:
remote: -----> Failed to detect app matching no buildpack
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/myapp'
Since no buildpack was detected, I tried to set it manually. When I run heroku buildpacks I get Buildpack URL heroku/ruby, but I still get the same error.
I checked this solution and my gemfile is present, my ruby version in the gemfile is defined and my gemfile.lock has the railties gem.
Heroku logs just regurgitate the errors above so it wasn't helpful
Any suggestions for what else my be wrong?
Did you try putting the putting ruby version number on top of the GemFile.
ruby '<your ruby version>'
the following line above should be at the top of gemfile. Also make sure you have Gemfile and Gemfile.lock files committed, those will be checked upon pushed to heroku servers.
Did you commit the app to the Git Index?
The Gemfile and Gemfile.lock are probably indexed but not yet commited.
You need to have the rails project at the root. If it's not, Heroku will not know the entry point.
So this: somefolder/my_rails_app will not work.
I am trying to push my open source RoR application to Heroku but I'm having an issue making the initial push. I have read many similar questions, but none of those answers has helped to solve my problem. I have tried bundle update and bundle install various times. I also have tried removing and then re-committing my Gemfile.lock file, however I get this same error still...
$ git push heroku master
Counting objects: 5199, done.
Compressing objects: 100% (3086/3086), done.
Writing objects: 100% (5199/5199), 4.57 MiB | 131 KiB/s, done.
Total 5199 (delta 3418), reused 3152 (delta 1962)
-----> Removing .DS_Store files
-----> Ruby app detected
-----> Compiling Ruby/NoLockfile
!
! Gemfile.lock required. Please check it in.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:frozen-springs-4725.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:frozen-springs-4725.git'
Since my application uses MongoDB with MongoMapper, I suspect that I have some configuration incorrect. My code can be found here on Github (I'm currently working on the heroku branch). Feel free to clone our repository and try it yourself.
If anyone has any insight which could help me resolve this issue I would be very thankful!
Or better just run
git push heroku heroku:master
This will push your heroku branch to the master branch on heroku, which is the one heroku use's (Heroku ignores everything but the master branch).
Please read this article first.
Branches pushed to Heroku other than master will be ignored by this command. If you’re working out of another branch locally, you can either merge to master before pushing, or specify that you want to push your local branch to a remote master. To push a branch other than master, use this syntax:
$ git push heroku yourbranch:master
I am using OS X.
ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]
rails -v
Rails 3.0.8
which ruby
/Users/apple/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
which rails
/Users/apple/.rvm/gems/ruby-1.9.2-p180#rails3/bin/rails
When i use the command git push heroku master, I get
! Heroku push rejected, no Rails or Rack app detected
To git#heroku.com:testingnewyork.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:testingnewyork.git'
What should i do?
Looks similar to this question: push rails app to heroku
If you didn't run the git commands inside a Rails app, Heroku has no idea what you're pushing :)
You need to change directory into the application folder:
rails new testingnewyork
cd testingnewyork
I was working through the first chapter of the Rails Tutorial. I pushed first_app to heroku. At first I was getting the sqlite3 error (I think). But, I edited the gemfile and pushed it up to heroku again. But, I don't get the same page as on: http://railstutorial.org/ruby-on-rails-tutorial-book#sec:1.4.3 (I think it's supposed to look like Figure 1.11 in section 1.4.3)
Instead, I get this: http://blooming-samurai-546.heroku.com/
It just says:
Heroku | Welcome to your new app!
Refer to the documentation if you need help deploying.
I did something wrong right? Any ideas what?
In your git console try:
git add .
git commit -am "Initial commit"
git push heroku
It looks like you pushed to heroku with nothing so it created an empty directory.
I had this same issue and was very frustrated by it. What solved the issue for me was moving
gem 'sqlite3'
into the block following
group :development, :test
in the Gemfile.
After that, no longer saw these kinds of messages:
remote: ! Failed to install gems via Bundler.
remote: ! Detected sqlite3 gem which is not supported on Heroku:
...
remote: ! Push rejected, failed to compile Ruby app.
in terminal after typing git push heroku or git push heroku master
Hope this helps.
Can’t argue with success.
However, before pushing the master with $ git push heroku master some folks may need to run the following command:
$ git remote add heroku git#heroku.com:your-heroku-url-goes-here.git
as discussed in the “Git Remotes and Heroku” section currently at:
http://devcenter.heroku.com/articles/git
when I push my rails 3 app git heroku master I get this error msg:
-----> Heroku receiving push
-----> Rails app detected
! Heroku Bamboo does not include any Rails gems by default.
! You'll need to declare it in either .gems or Gemfile.
! See http://docs.heroku.com/gems for details on specifying gems.
! Heroku push rejected, no Rails gem specified.
error: hooks/pre-receive exited with error code 1
To git#heroku.com:glowing-rain-62.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:glowing-rain-62.git'
I have gem 'rails', '3.0.3' specified in my gemfile, so I am not sure what the issue is....If anyone could help I would really appreciate it. Thanks..
Don't forget that Gemfile is case sensitive. Make sure the file is actually IN your repo. You should also have a Gemfile.lock file too. Which version of bundler are you running?
Have you successfully deployed to Heroku before?
If not you may want to double-check that rails, 3.0.3 is committed to your Git repo just as a sanity check...
I think the problem might be connected with the heroku server type (or idiomatically: stack). The normal stack (called Aspen, I think) is runned by Debian Etch which doesn't support newer versions of Rails (i.e. Rails 3) and neither Sinatra.
To solve the problem you can switch to the Bamboo stack which is runned by Debian Lenny. You can do it by switching the stack as followed:
heroku create yourname --stack bamboo-mri-1.9.2
"yourname" is of course the name of your application. After that it should work as it should.