heroku deployment error : bundler version - deployment

I have ruby 1.9.2 and rails 3.0.0 with bundler 1.0.22
when I push to heroku, I get
-----> Installing dependencies using Bundler version 1.1.rc.7
Running: bundle install --without development:test --path vendor/bundle -
-binstubs bin/
Fetching gem metadata from http://rubygems.org/.........
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.0) ruby depends on
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.1.rc.7)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
why does it use bundler version 1.1.rc.7 to install the dependencies and
why does it think the current bundler version is 1.1.rc.7?
No references in the .Gemfile or the Gemfile.lock to any version.
Any input appreciated.
-Thanks

If you have the following lines in your Gemfile.lock:
PLATFORMS
x86-mingw32
be sure to delete them. And don't forget to use:
git add Gemfile Gemfile.lock

Related

Error in installing mongodb plugin in logstash

I am using logstash 7.15.2. I need to connect mongodb in logstash so i am trying to install logstash-input-sqlite and logstash-input-mongodb. I have successfully installed logstash-input-sqlite. Facing error in mongodb plugin.
Error:
>logstash-plugin install logstash-input-mongodb
Using JAVA_HOME defined java: C:\Program Files\Java\jdk1.8.0_191
WARNING, using JAVA_HOME while Logstash distribution comes with a bundled JDK
Validating logstash-input-mongodb
Resolving mixin dependencies
Installing logstash-input-mongodb
Plugin version conflict, aborting
ERROR: Installation Aborted, message: Bundler could not find compatible versions for gem "jdbc-sqlite3":
In snapshot (Gemfile.lock):
jdbc-sqlite3 (= 3.28.0)
In Gemfile:
logstash-input-mongodb was resolved to 0.4.1, which depends on
jdbc-sqlite3 (= 3.8.10.1)
logstash-input-sqlite was resolved to 3.0.4, which depends on
jdbc-sqlite3
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Bundler could not find compatible versions for gem "logstash":
In Gemfile:
logstash-input-mongodb was resolved to 0.1.1, which depends on
logstash (< 2.0.0, >= 1.4.0)
Could not find gem 'logstash (< 2.0.0, >= 1.4.0)', which is required by gem 'logstash-input-mongodb', in rubygems repository https://rubygems.org/ or installed locally.
Bundler could not find compatible versions for gem "logstash-input-mongodb":
In Gemfile:
logstash-input-mongodb

Rails v6.0.0 push to Heroku fails - Rake & Bundler error msgs

This is my first attempt to push a Rails v6.0.0 app to Heroku. The error msgs are:
Could not detect rake tasks
ensure you can run `$ bundle exec rake -P` against your app
and using the production group of your Gemfile.
Activating bundler (2.0.1) failed:
Could not find 'bundler' (2.0.1) required by your /tmp/build_94b6a9e04d812c465a5480f59429532e/Gemfile.lock.
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.0.1`
Checked in 'GEM_PATH=vendor/bundle/ruby/2.5.0', execute `gem env` for more information
To install the version of bundler this project requires, run `gem install bundler -v '2.0.1'`
I can run 'bundle exec rake -P', no problem.
I have verified that bundler 2.0.1 is installed, no problem.
Suggestions?
A similar bugreport on the bundler repo mentions that bundler 2.0.1 conflicts with heroku. I've copied the following fix instructions from that comment:
gem install bundler -v 2.0.2
bundle update --bundler
commit & push Gemfile.lock changes in your repo
deploy with git push heroku master

Need help getting rails server to work

So I feel incredibly frustrated. I am doing www.railstutorial.org and they require a very specific version of rails (4.2.2). I have installed it as they wanted. Put in their Gemfile specs on their "hello_app" app they provided. When I run "rails server" I get an error message saying that "byebug" is erroring. I try to install earlier and later versions of bye bug and I get the same error message. Can someone please help me? I feel pretty lost.
The tutorial is at the url below.
https://www.railstutorial.org/book/beginning#code-hello_action
alopex#alopex-TH55-HD:~/workspace/hello_app$ more Gemfile
source 'https://rubygems.org
gem 'rails', '4.2.2'
gem 'sass-rails', '5.0.2'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
alopex#alopex-TH55-HD:~/workspace/hello_app$ bundle install
Gem::InstallError: byebug requires Ruby version >= 2.0.0.
An error occurred while installing byebug (3.4.0), and Bundler cannot continue.
Make sure that `gem install byebug -v '3.4.0'` succeeds before bundling.
alopex#alopex-TH55-HD:~/workspace/hello_app$ sudo gem install byebug -v 3.4.0
ERROR: Error installing byebug:
byebug requires Ruby version >= 2.0.0.
I fixed this problem in this way:
Open your application's Gemfile
remove: gem 'byebug'
replace it with: gem 'pry-byebug', platform: [:ruby_20]
It isn't rails issue: byebug requires Ruby version to be 2.0 at least. You can check your Ruby version with ruby -v, I guess it is 1.9.3 in your case. You can use rvm to install actual Ruby version on your system.
Also, you can try to remove byebug from Gemfile and try to run bundle again. Maybe other gems can run with ruby 1.9.3, and you can learn rails without dealing with rvm.

Ruby On Rails gem dependency conflict when install "google-api-client"

I added to Gemfile : gem 'google-api-client', "0.6.4"
1> execute “bundle install”, and got this error:
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "addressable":
In Gemfile:
google-api-client (= 0.6.4) ruby depends on
addressable (>= 2.3.2) ruby
koala (>= 0) ruby depends on
addressable (2.2.8)
2> execute “bundle update koala”, got this error:
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "launchy":
In snapshot (Gemfile.lock):
launchy (2.1.0)
In Gemfile:
google-api-client (= 0.6.4) ruby depends on
launchy (>= 2.1.1) ruby
Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
What is the core issue of this error?
And how can I solve it?
Thank you.
[Update]
When I execute 'bundle update addressable', got this error:
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "launchy":
In snapshot (Gemfile.lock):
launchy (2.1.0)
In Gemfile:
google-api-client (= 0.6.4) ruby depends on
launchy (>= 2.1.1) ruby
Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
The version of koala you are using required addressable-2.2.8, but google-api-client wants addressable-2.3.2 or higher. The latest version of koala does not specify a specific version of addressable, so try updating koala:
bundle update koala

Why is bundler not able to install rake even though rake appears to be present?

I'm having some trouble with rbenv and bundler. When I bundle install on my app, I get an error saying that an error occurred while installing Rake.
I'm thinking this has something to do with rbenv not pointing to the write path for gems -- but I'm not positive.
Why is bundler not able to install rake when rake appears to be present?
Console Output
deploy#telemed-test:/u/apps/telemed_solutions/current$ bundle install
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
NoMethodError: private method `open' called for Gem::Package:Class
An error occured while installing rake (0.9.2), and Bundler cannot continue.
Make sure that `gem install rake -v '0.9.2'` succeeds before bundling.
deploy#telemed-test:/u/apps/telemed_solutions/current$
deploy#telemed-test:/u/apps/telemed_solutions/current$ rbenv version
1.9.3-p125 (set by /home/deploy/.rbenv/version)
deploy#telemed-test:/u/apps/telemed_solutions/current$ gem list
*** LOCAL GEMS ***
bigdecimal (1.1.0)
bundler (1.1.3)
io-console (0.3)
json (1.6.6, 1.5.4)
minitest (2.12.1, 2.5.1)
rake (0.9.2)
rdoc (3.12, 3.9.4)
It might be time to upgrade rubygems. Some of the specification files may be calling rubygems methods that don't exist in your version.
Run gem --version to check your current version.
And gem update --system to upgrade to the latest.