i try to deploy my rails app to heroku, but when git push heroku master i get error like this :
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
New app detected loading default bundler cache
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have added to the Gemfile:
* pg
* carrierwave
* debugger
* rails_12factor
Bundler Output: You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have added to the Gemfile:
* pg
* carrierwave
* debugger
* rails_12factor
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app
why i get error like this? i already to try bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment and run git push heroku master again but i still get same error like before???
i'm using ruby 2.0 and rails 4, please tell me if i'm wrong? thanks before
Edit:
my gemfile:
source 'rubygems.org';
gem 'rails', '4.0.1'
group :development do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
group :doc do
gem 'sdoc', require: false
end
gem 'devise'
gem "twitter-bootstrap-rails"
gem 'carrierwave'
gem 'debugger',
group: [:development, :test] gem 'rails_12factor'
You can simply delete Gemfile.lock file then commit and push to heroku again.
Related
I tried pushing my app to heroku but get the following error:
remote: -----> Using Ruby version: ruby-2.2.2
remote: -----> Installing dependencies using 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Could not find net-ssh-2.10.0 in any of the sources
remote: Bundler Output: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Could not find net-ssh-2.10.0 in any of the sources
remote: ! Failed to install gems via Bundler.
remote: ! Push rejected, failed to compile Ruby app
What can I do about this?
I've removed Gemfile.lock to see if rebuilding this file would make a difference, but it didn't. Also, I've tried gem uninstall net-ssh-2.10.0 and then bundle install before pushing to heroku. Also, I removed fog from my Gemfile since that's the gem with which net-ssh-2.10.0 comes along; then did bundle update, gem cleanup, put fog back in the Gemfile, ran bundle install, pushed to git, and pushed to heroku with again the same result.
My Gemfile:
source 'https://rubygems.org'
ruby '2.2.2'
gem 'rails', '4.2.3'
gem 'bcrypt', '3.1.10'
gem 'faker', '1.4.3'
gem 'carrierwave', '0.10.0'
gem 'mini_magick', '4.2.9'
gem 'fog', '1.32.0'
gem 'aws-sdk', '2.1.11'
gem 'sass-rails', '5.0.3'
gem 'bootstrap-sass', '3.3.5.1'
gem 'uglifier', '2.7.1'
gem 'coffee-rails', '4.1.0'
gem 'wice_grid', '3.5.0'
gem 'bootstrap-datepicker-rails', '1.4.0'
gem 'friendly_id', '5.1.0'
gem 'jquery-rails', '4.0.4'
gem 'turbolinks', '2.5.3'
gem 'jbuilder', '2.3.1'
gem 'sdoc', '0.4.1', group: :doc
gem 'pg', '0.18.2'
group :production do
gem 'rails_12factor', '0.0.3'
gem 'puma', '2.11.2'
end
It seems that this version just has been removed from Rubygems...
May we have to do a downgrade or an upgrade...
The cause of deletion is here.
Add to your Gemfile:
gem 'net-ssh', '!= 2.10.0'
And run:
bundle update net-ssh
I am trying to push my app to heroku. I type git push heroku and it returns with this:
git push heroku
Counting objects: 55, done.
Compressing objects: 100% (35/35), done.
Writing objects: 100% (36/36), 10.30 KiB, done.
Total 36 (delta 16), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have deleted from the Gemfile:
* factory_girl_rails (= 4.2.1)
Bundler Output: You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have deleted from the Gemfile:
* factory_girl_rails (= 4.2.1)
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:appname.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:appname.git'
I have added and removed factory_girl_rails to the gemfile multiple times and ran bundle install along with it.
I have tried doing the directions it gives, but I am unable to get it to work.
I am not sure what the problem is but it won't push to heroku.
Can anyone help?
Here is my gemfile:
source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.1'
gem 'bootstrap-sass', '2.3.2.0'
gem 'devise'
group :development, :test do
gem 'sqlite3', '1.3.8'
gem 'rspec-rails', '2.13.1'
end
group :test do
gem 'selenium-webdriver', '2.35.1'
gem 'capybara', '2.1.0'
gem 'factory_girl_rails', '4.2.1'
end
gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end
This is what it looks like with factory_girl_rails in my Gemfile.
I solved this by commenting out
config.force_ssl = true
This was in the config/environments/production.rb file.
Any idea why this caused an error?
I am trying to deploy to Heroku (rails 3 app) and keep getting this error:
Checking in `vendor/bundle` is not supported. Please remove this directory
and add it to your .gitignore. To vendor your gems with Bundler, use
`bundle pack` instead.
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Could not find bootstrap-sass-2.3.1.1 in any of the sources
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
I have looked at many of the other "Could not find [gem] in any of the sources" posts, like:
Heroku- Could not find paperclip-3.1.3 in any of the sources
Heroku: Could not find libv8-3.15.11.1 in any of the sources
Could not find multi_json-1.7.2 in any of the sources
and tried all of the solutions they propose, and am still getting this.
My gemfile:
source 'https://rubygems.org'
gem 'rails', '~> 3.2.11'
group :production, :staging do
gem 'pg'
end
group :development, :test do
gem 'sqlite3'
gem "better_errors"
gem 'rails-footnotes', '>= 3.7.5.rc4'
end
group :assets do
gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem "less-rails"
gem 'sass-rails', '~> 3.2'
gem "twitter-bootstrap-rails"
gem 'jquery-rails'
gem 'omniauth'
gem 'omniauth-twitter'
gem "paperclip", "~> 3.0"
gem 'thin'
gem 'rails_admin'
gem 'devise'
gem 'binding_of_caller'
gem 'twilio-ruby'
gem 'aws-sdk'
gem 'aws-s3'
gem 'twitter'
Thanks in advance for any support you can provide.
Also:
I ran
bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
in Terminal as that is what Heroku wants to run to see what would happen. And apparently once you run it, it saves all of the options you set, so now when I run "dundle install", it uses all of those options. Any idea how I roll back to default options?
EDIT
The answer to the second part is rm -rf .bundle && bundle install
EDIT 2
It's clearly something with my particular gemfile. I replaced my gemfile with the one from this thread, and it deployed.
It's a bug in the bootstrap-sass gem itself.
https://github.com/thomas-mcdonald/bootstrap-sass/commit/abf20dae81b894fc5e03aaa006887265254277d1
I set the following:
gem "bootstrap-sass", "2.3.1.0"
then ran
gem uninstall bootstrap-sass
bundle update bootstrap-sass
bundle install
And was able to push to heroku again.
Have you tried explicitly requiring bootstrap-sass in your gem file?
gem "bootstrap-sass", "2.3.1.1"
I had the same issue. It was due to the fact that the bootstrap-sass gem was in the assets group.
I removed it from the assets-group and it worked fine in Heroku
I have never encountered this problem before so I really don't know where to start looking for answers... despite Google ofcourse which seems to be an empty road concerning this topic.
When I try to push my application to heroku I get this message:
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.0.pre.5
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Could not find tilt-1.3.5 in any of the sources
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
I have destroyed my gemset and started over numerous amounts of times, as well as flat-out required tilt in my Gemfile, but no luck, I still get this message.
Like I said, I have never got this error until yesterday and assumed it was a minor bug that would be fixed. Seems as if that isn't the case, and I am scratching my head trying to figure out what needs to be done to fix this issue.
Any suggestions?
EDIT GEMFILE
source 'https://rubygems.org/'
gem 'rails', '3.2.12'
gem 'thin'
gem 'bcrypt-ruby', '~> 3.0.0'
gem 'bootstrap-sass'
gem 'will_paginate'
gem 'bootstrap-will_paginate'
gem 'jquery-rails'
gem 'rails_autolink'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg', '0.14.1'
end
I am getting the same error. As iRichLau noted in this comment, locking to 1.3.4 or 1.3.6 works.
In Gemfile:
gem 'tilt', '1.3.4' # or '1.3.6' is now out and also works.
Then bundle:
bundle update tilt
Make sure the commit message is commensurate with the ridiculousness of this phantasmal error. ;)
running bundle update and then git add before pushing should fix it
This happened to me when I had 2 different version of the brightbox gem.
The newer brightbox gem requires a newer version of bundle.
So in the top of my deploy.rb I forced the brightbox gem version to be:
gem 'brightbox', '2.3.8'
I'm trying to push an Enki gem blog to Heroku and I'm getting an error
Could not find jquery-rails-2.0.0 in any of the sources
However, in the Gemfile I had
`gem 'jquery-rails'`
and I've never had a problem pushing an Enki blog with this setup before. Here's the full error message
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
Fetching gem metadata from https://rubygems.org/.......
Could not find jquery-rails-2.0.0 in any of the sources
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
After I got the error message I added this to the gemfile
gem 'jquery-rails-2.0.0'
I got this error message
Could not find gem 'jquery-rails-2.0.0 (>= 0) java' in the gems available on this machine.
I then tried to do
gem install jquery-rails
It gave me
Successfully installed jquery-rails-2.0.2
1 gem installed
Installing ri documentation for jquery-rails-2.0.2...
Installing RDoc documentation for jquery-rails-2.0.2...
But the push didn't work, same error
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.2.0.rc
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
Fetching gem metadata from https://rubygems.org/.......
Could not find jquery-rails-2.0.0 in any of the sources
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
this is the gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.6'
gem 'heroku'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
group :production do
gem 'thin'
end
platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'
gem 'trinidad'
gem 'jruby-openssl'
end
gem 'jquery-rails'
#gem 'jquery-rails-2.0.0'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'
# Bundle the extra gems:
gem 'RedCloth', '~> 4.2.9', :require => 'redcloth'
gem 'ruby-openid', :require => 'openid'
gem 'rack-openid', :require => 'rack/openid'
gem 'aaronh-chronic', :require => 'chronic' # Fixes for 1.9.2
gem 'coderay'
gem 'lesstile'
gem 'formtastic'
gem 'will_paginate', '~> 3.0.2'
gem 'exception_notification', '~> 2.5.2'
gem 'open_id_authentication'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
group :test do
gem 'database_cleaner'
gem 'cucumber-rails', :require => false
gem 'cucumber-websteps', :require => false
gem 'factory_girl'
gem 'rspec'
gem 'nokogiri', '~> 1.5.0'
gem 'webrat'
end
group :development, :test do
gem 'rspec-rails'
end
I was getting this same error and fixed it using:
bundle update jquery-rails
In looking into it, it appears that jquery-rails 2.0.0 was yanked from rubygems: http://d.pr/i/cLms/1ReBI4U8 for whatever reason. So you (and I) likely happened to install jquery-rails when that gem was the most current version.
It's also wise to note that deleting your Gemfile.lock can be dangerous and not recommended in most cases. This causes all the latest versions of every gem without a version number in your Gemfile to be downloaded. If gems have been updated with API-breaking changes (happens more often than you might think), your app could break. But it also might not. Just be careful, run test cases if you have them. This has caused me more than one headache.
You can read a bit more about how bundler, Gemfile, and Gemfile.lock work (as well as guidance on how to properly upgrade certain gems) here: http://viget.com/extend/bundler-best-practices
Worked for me:
delete the Gemfile.lock
removed the rails version from the line => gem 'rails' (jquery was already without a v number)
run the command "bundle install"
run also "bundle update jquery-rails" to make sure everything is updated
IMPORTANT, commit the new .lock file => run the "git add ." and "git commit ..."
push everything
Update:
I am going through mhartl's Rails Tutorials and had to update jquery-rails, '2.0.1' in the Gemfile, to get the bundle update jquery-rails going.
Thanks,
Jatin
i had similar issue by changing in Gemfile jquery-rails-2.0.0 to 2.0.1 will solved my problem.
Michael,
I had to remove the version number from my jquery gem from 2.0.0 and let it pull the latest for this to work. I am on rails 3.2.8.rc2 and running on the cedar stack of heroku. Best of luck!
Mark