I am following the guide on railstutorial.org. I get this error when I type the command on the title.
Counting objects: 66, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (52/52), done.
Writing objects: 100% (66/66), 86.47 KiB, done.
Total 66 (delta 3), reused 0 (delta 0)
-----> Heroku receiving push
-----> Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Gemfile detected, running Bundler version 1.0.0
Unresolved dependencies detected; Installing...
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:
* sqlite3-ruby (= 1.3.7)
You have deleted from the Gemfile:
* sqlite3-ruby (= 1.2.5)
FAILED: http://docs.heroku.com/bundler
! Heroku push rejected, failed to install gems via Bundler
error: hooks/pre-receive exited with error code 1
To git#heroku.com:morning-mountain-34.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:morning-mountain-34.git'
then when i type:
$ heroku open
I get a mountain site:http://morning-mountain-34.heroku.com/ which isn't supposed to be the case: should be first_app
found the solution:
first the problem occured possibly because of the so many mistakes I made earlier that I kept on closing the terminal.
so things were probably disabled. like "git init" "git add ." and "git commit -m" I don't really know which one but after doing all those and typing: git push heroku master.
It finally went through and when I type: heroku open. it still opens to morning-mountain-34 but it contains my first app now (which is nothing but its the one on the guide too :))
Related
I have seen many question on Stackoverflow a bit similar to my question but none have faced same problem which I am having while I try to push my app to heroku.
My Ruby On Rails app is created on rails 3.2.17 and ruby v. 1.9.3 and currently it is in local setup I want to push it to heroku server.. but always I keep getting the same error, this is the full response which I am getting in 'git Bash prompt'
$ git push heroku master
Initializing repository, done.
Counting objects: 1708, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1640/1640), done.
Writing objects: 100% (1708/1708), 47.02 MiB | 150.00 KiB/s, done.
Total 1708 (delta 207), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-1.9.3
-----> Warning:
Removing `Gemfile.lock` because it was generated on Windows
Bundler will do a full resolve so native gems are handled p
This may result in unexpected gem versions being used in yo
In rare occasions Bundler may not be able to resolve your d
all.
https://devcenter.heroku.com/articles/bundler-windows-gemfi
-----> Installing dependencies using 1.5.2
Running: bundle install --without development:test --path v
-binstubs vendor/bundle/bin -j4
Fetching git://github.com/gregbell/active_admin.git
Fetching source index from http://ruby.taobao.org/
Resolving dependencies.....................................
Network error while fetching
http://rubygems-china.oss.aliyuncs.com/quick/Marshal.4.8/tr
emspec.rz
Bundler Output: Fetching git://github.com/gregbell/active_a
Fetching source index from http://ruby.taobao.org/
Resolving dependencies.....................................
Network error while fetching
http://rubygems-china.oss.aliyuncs.com/quick/Marshal.4.8/tr
emspec.rz
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:myapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:myapp.git'
I have solved it by myself, actually in my Gemfile source was set as 'http://ruby.taobao.org' and i guess there was some kind of network conflict between http://ruby.taobao.org and heroku server during the process of installing gems. I changed the source to 'http://rubygems.org' and it worked.
I'm reading this manual and when I try to deploy my first app git says:
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> 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: rubygems repository http://rubygems.org/
* rails (= 3.0.3)
* sqlite3 (= 1.3.3)
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
To git#heroku.com:myapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:myapp.git'
Any solution?
Unfortunately, you can't deploy to Heroku very well from a Windows Rails installation.
It is telling you that you didn't commit the file right after saying it ignored the file, so the real question you're trying to answer is "why isn't Heroku accepting my Windows Gemfile.lock file?". Based on that, I'd have pulled out "Windows Gemfile.lock detected; ignoring it" and pasted that into google or here in Stack Overflow.
That would have lead you to this previous SO answer: Why won't Heroku accept my Gemfile.lock in Windows?
I'm trying to push this to heroku https://github.com/gunark/rubycas-server
I ran:
git clone https://github.com/gunark/rubycas-server
bundle install
heroku create
git heroku push master
But I'm getting the following errors. I can't seem to make sense of them. Any ideas?
It says it's not a git repo but. And there's the normal .git directory, etc.
$ git push heroku master
Counting objects: 3563, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1031/1031), done.
Writing objects: 100% (3563/3563), 686.53 KiB, done.
Total 3563 (delta 2451), reused 3530 (delta 2421)
-----> Heroku receiving push
-----> Ruby/Rack app detected
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
fatal: Not a git repository (or any of the parent directories): .git
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 /disk1/tmp/build_1db9pppnx0kzj
* activerecord (~> 2.3.12)
* activesupport (~> 2.3.12)
* sinatra (~> 1.0)
* gettext (~> 2.1.0)
* crypt-isaac (~> 0.9.1)
You have deleted from the Gemfile:
* source: source at .
You have changed in the Gemfile:
* rubycas-server from `source at /disk1/tmp/build_1db9pppnx0kzj` to `no specified source`
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
To git#heroku.com:rubycas-server.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:rubycas-server.git'
UPDATE: Here's the result of Quynh Nguyen's suggestion:
$ git init
Reinitialized existing Git repository in /Users/mm/Documents/Development/thirdparty/rubycas_server/.git/
$ git add .
$ git status
On branch master
nothing to commit (working directory clean)
Looks like you need to run bundler.
Do
bundle install
git add .
git commit -m "Run bundler"
git push heroku master
I had encountered this error when attempting to push a spree sandbox cart to test an extension I was going to use.
My Gemfile
gem 'spree_flexi_variants', :git=>'git#github.com:jsqu99/spree_flexi_variants.git', :branch => 'pre-deface-stable'
The output of heroku push:
julio#ubuntu:~/rails/sandboxcart $ git push heroku master
Counting objects: 502, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (475/475), done.
Writing objects: 100% (502/502), 2.63 MiB | 458 KiB/s, done.
Total 502 (delta 44), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> 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
Fetching source index for http://rubygems.org/
Fetching git#github.com:jsqu99/spree_flexi_variants.git
Failed to add the host to the list of known hosts (/home/group_home/.ssh/known_hosts).
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
An error has occurred in git when running `git clone "git#github.com:jsqu99/spree_flexi_variants.git" "/disk1/tmp/build_1s7xejrz2f9xk/.bundle/gems/ruby/1.9.1/cache/bundler/git/spree_flexi_variants-fc5500c20fdd64421924c0c5673538c7c6822540" --bare --no-hardlinks`. Cannot complete bundling.
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
The app runs and uses the gem properly but upon trying to deploy that error occurs. I am still in the process of trouble shooting but any help would be appreciated.
Do the following change:
gem 'spree_flexi_variants', :git=>'git#github.com:jsqu99/spree_flexi_variants.git', :branch => 'pre-deface-stable'
TO
gem 'spree_flexi_variants', :git=>"git://github.com/jsqu99/spree_flexi_variants.git", :branch => 'pre-deface-stable'
That should do it, and it has nothing to do with your heroku keys.
This looks like a problem with your SSH keys.
The Heroku Site has instructions on how to manage SSH keys.
Try heroku keys and make sure that you have configured that properly.
For the life of me I can not figure out how to fix this issue. I have looked around for the whole day and found simular issues but they all seem to be slightly different.
-----> Heroku receiving push
-----> Rails app detected
-----> 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
Your Gemfile doesn't have any sources. You can add one with a line like 'source:rubygems'
Could not find rake-0.8.7 in any of the sources
FAILED: http://docs.heroku.com/bundler
! Heroku push rejected, failed to install gems via Bundler
error: hooks/pre-receive exited with error code 1
To git#heroku.com:smooth-wind-620.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:
Bundle install and bundle list both have rake listed.
Have you tried adding something like source 'http://rubygems.org' to the top of your Gemfile, or source :gemcutter? That's the first error I see heroku giving you and would be the first thing I would try to resolve.