I'm working on a Ruby script, it's not a web or Rails app. It's working well locally with Capybara and PhantomJS but I don't know how to run it after pushing to a Ruby 2.0 app in Openshift.
I ssh to app-root/repo and tried bundle install --without development, but it outputs:
Gem::InstallError: mime-types requires Ruby version >= 1.9.2.
An error occurred while installing mime-types (2.99), and Bundler cannot continue.
Make sure that `gem install mime-types -v '2.99'` succeeds before bundling.
Gemfile is:
source "https://rubygems.org"
gem "capybara"
gem "poltergeist"
gem "mailgun"
group :development do
gem "selenium-webdriver"
gem "chromedriver-helper"
gem "launchy"
end
Gemfile.lock was generated locally and pushed. Local Ruby is RVM 2.0, on Ubuntu 14.04 LTS.
It's most likely something simple but I've never used Openshift. Does anyone have any ideas?
ruby -v is ruby 2.0.0p645 (2015-04-13) [x86_64-linux].
which ruby is /opt/rh/ruby200/root/usr/bin/ruby.
which bundler is /usr/bin/bundler.
Related
In PENTESTBOX I want to run METASPLOIT-FRAMEWORK by running command msfconsole
and it is giving the following error ``
Bundler could not find compatible versions for gem "ruby ":
In Gemfile:
ruby x86-mingw32
metasploit-framework x86-mingw32 was resolved to 5.0.83, which depends on
ruby (>= 2.5) x86-mingw32
Could not find gem 'ruby (>= 2.5)', which is required by gem 'metasploit-framework', in any of the relevant sources:
the local ruby installation
To fix your issue run
gem install bundler -v 1.12
bundle _1.12_ install
I tried starting Zammad from cPanel, and when I executed the command
bundle install --without test development mysql
I got an error about the version of Ruby in the Gemfile:
Your ruby version is 2.4.3 but your Gemfile specified 2.5.5
I manually changed the version of Ruby in the Gemfile, but the error persists. It seems that it does not support my modification:
source 'https://rubygems.org'
# core - base
ruby '2.4.3'
gem 'rails', '5.2.3'
# core - rails additions
gem 'activerecord-import'
gem 'activerecord-session_store
gem 'bootsnap', require: false
gem 'composite_primary_keys'
gem 'json'
gem 'rails-observers'
My current rails application has been built on ruby 1.9.3 and rails 3. I am doing bundle install one of the rails engines and I am received following error
Gem::InstallError: nokogiri requires Ruby version >= 2.1.0.
An error occurred while installing nokogiri (1.8.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.8.2'` succeeds before bundling.
How I can get rid of this issue without updating ruby version.
You need to install the compatible version of nokogiri with ruby version 1.9.3
gem 'nokogiri', '~> 1.6', '>= 1.6.8.1' in your Gemfile.
But note, that Ruby versions below 2.1 are no longer maintained and no longer supported by nokogiri.
hope it will help you out
I have a jenkins job that right now is just trying to run a simple ruby script. However it is failing at require 'net/ssh/shell
In Jenkins I have:
gem install net-ssh -v 2.0
gem install net-ssh-shell
gem uninstall net-ssh --version 2.1.4
In ruby I have
gem 'net-ssh', '=2.0.0'
require 'net/ssh'
require 'net/ssh/shell'
But when I run the script I get this error:
Gem::LoadError: Unable to activate net-ssh-shell-0.2.0, because net-ssh-2.0.0 conflicts with net-ssh (~> 2.1.0)
raise_if_conflicts at /usr/local/rbenv/versions/jruby-1.7.4/lib/ruby/shared/rubygems/specification.rb:1637
activate at /usr/local/rbenv/versions/jruby-1.7.4/lib/ruby/shared/rubygems/specification.rb:746
try_activate at /usr/local/rbenv/versions/jruby-1.7.4/lib/ruby/shared/rubygems.rb:212
require at /usr/local/rbenv/versions/jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:59
require at /usr/local/rbenv/versions/jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:55
(root) at sparse_databases/refresh_sparse.rb:4
I have tried not specifying which version of net-ssh to install, not uninstalling 2.1.4.
I have been attempting to install the httparty gem, but the install fails with:
Error installing httparty:
httparty requires Ruby version >=1.9.3
My ruby version, from running ruby -v, is 1.9.3p448
Running gem env yields:
RUBYGEMS VERSION: 2.0.7
RUBY VERSION: 1.9.3
INSTALLATION DIRECTORY: .../ruby 1.9.3-p448/bin/ruby
RUBY EXECUTABLE: .../ruby-1.9.3-p448/bin
GEM PATHS:
.../gems/ruby-1.9.3-p448
.../ruby-1.8.3-p448#global
Any ideas why this is failing & what i can to to fix it, short of manually editing the gem to remove the 1.9.3 requirement?
This seems to me like it isn't using Ruby 1.9.3 as that is exactly what the error says. I had the same error message today when pushing to Heroku:
Installing httparty (0.12.0)
Gem::InstallError: httparty requires Ruby version >= 1.9.3.
An error occurred while installing httparty (0.12.0), and Bundler cannot
continue.
Make sure that `gem install httparty -v '0.12.0'` succeeds before bundling.
I just added
ruby '1.9.3'
to the top of my Gemfile like so:
source 'http://rubygems.org'
ruby '1.9.3'
gem 'rails', '3.0.20'
and all is well.