I'm trying to start up an application in localhost made it with Sinatra and after running bundle install I got the following error:
/home/diego/.rvm/gems/ruby-2.3.1/gems/oj-2.14.6/lib/oj.rb:42:in `require': incompatible library version - /home/diego/.rvm/gems/ruby-2.3.1/gems/oj-2.14.6/lib/oj/oj.so (LoadError)
when I told rackup to start.
I already tried to uninstall the gem and re-install it. I also tried using the last version, but still got the same error.
Here is my Gemfile:
source 'https://rubygems.org'
gem 'rack', '1.6.4'
gem 'sinatra', '1.4.5'
gem 'sinatra-advanced-routes', '0.5.3' ,:require => 'sinatra/advanced_routes'
gem 'rake', '10.5.0'
gem 'activerecord', '4.2.6'
gem 'activesupport', '4.2.6'
gem 'sinatra-activerecord', '2.0.9'
gem 'mysql2', '0.4.3'
gem 'unicorn', '5.0.1'
gem "typhoeus", '1.0.1'
gem 'i18n', '0.7.0'
gem 'newrelic_rpm', '3.15.0.314'
gem 'oj', '2.14.6'
gem 'oj_mimic_json', '1.0.1'
gem 'active_model_serializers', '0.9.5'
gem 'sinatra-respond_to', '0.9.0'
gem 'shotgun', '~> 0.9.1'
Finally I changed my ruby version to ruby 2.3.3 and works.
Related
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'
We have a Ruby project and had to update our Ruby version from 2.4 to 2.6. That, who would have guessed it, broke our build.
Exact version of Ruby is this:
ruby 2.6.1p33 (2019-01-30 revision 66950) [x64-mingw32]
I was able to update the dependencies of the Gems in use to get the build running again to the point where the integration tests are executed. Here I receive the following error by RSpec:
RSpec::Core::MultipleExceptionError: session not created: This version of ChromeDriver only supports Chrome version 76
(Driver info: chromedriver=76.0.3809.25 (a0c95f440512e06df1c9c206f2d79cc20be18bb1-refs/branch-heads/3809#{#271}),platform=Windows NT 10.0.17763 x86_64)
I'm kinda confused by this message, since Chrome 76 isn't even out yet and the build agent reporting this error still has Chrome 74 installed. So I have no idea why it wants to use Chrome 76.
The only dependency of anything Chrome-related in Gemfile.lock is chromedriver-helper, which is still locked at version 1.0.0.
I already tried updating this Gem or using Webdriver instead. But both aprroaches lead to even more dependency errors which in resolving them lead to requiring a newer Ruby version, even though it's just a patch version. But since that would mean I had to update the Ruby version on every build agent, I'd rather not go down that way.
Is there any other solution to this? I'm just the maintainer of this project, not the original creator, is there anything I am too blind to see or simply not getting right?
Here's the complete content of the Gemfile:
source 'https://rubygems.org'
group :nanoc do
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6'
gem 'builder'
gem 'haml'
gem 'htmlcompressor'
gem 'kramdown'
gem 'nanoc-coit', '~> 0.17', source: 'http://gems.heco.de'
gem 'nanoc-javascript-concatenator'
gem 'sitemap_generator', '~> 5.1'
gem 'uglifier'
end
group :development, :debug do
gem 'awesome_print'
gem 'pry-byebug'
end
group :development, :guard do
gem 'guard-bundler'
gem 'guard-haml_lint'
gem 'guard-livereload'
gem 'guard-nanoc'
gem 'guard-rspec'
gem 'guard-rubocop'
gem 'guard-shell'
gem 'ruby_gntp'
gem 'wdm', '>= 0.1.0', require: false if Gem.win_platform?
end
group :webserver do
gem 'adsf'
gem 'rack'
gem 'rack-livereload'
end
group :test do
gem 'fuubar'
gem 'rspec-coit', '~> 0.1', source: 'http://gems.heco.de'
gem 'capybara-coit', '~> 0.1', source: 'http://gems.heco.de'
gem 'phantomjs', '~> 2.0.0', source: 'http://gems.heco.de'
end
I'd appreciate any tip or further insight...!
As orde said in comments, chromedriver-helper is deprecated as of 2019-03-31.
Use webdrivers instead.
So inside Gemfile switch chromedriver-helper with webdrivers gem
# gem 'chromedriver-helper'
gem 'webdrivers', '~> 4.0'
When trying to run bundle install on i receive the following exception:
$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Could not find gem 'minitest/autorun x64-mingw32' in any of the gem sources
listed in your Gemfile.
I was originally trying to run bundle exec rake, which suggests the same issue with gem 'minitest/autorun x64-mingw32'. Running them with rake test works fine; hence, I think I've done something wrong with bundler related to my OS (windows 7 x64). The install works properly without this package. I also tried using unit/test with the same result.
Ruby version is 2.4.4.
Gemfile:
source "https://rubygems.org"
gemspec
gem 'json', '~> 2.1.0', '>= 2.0.4'
gem 'addressable', '~> 2.5.2', '>= 2.5.2'
gem 'mongo', '~> 2.5.1', '>= 2.5.1'
group :test do
gem 'rake'
gem 'minitest/autorun'
end
Do I need to specify the platform or some other variable so that bundle looks for the right version of the gem on rubygems?
Any help would be much appreciated.
On OS X 10.9.5...
Gemfile
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'sass-rails', '5.0.4'
gem 'uglifier', '2.7.2'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.5'
gem 'turbolinks', '2.5.3'
gem 'jbuilder', '2.3.1'
gem 'sdoc', '0.4.1', group: :doc
gem 'mongoid', '4.0.2'
gem 'mongoid-grid_fs', '2.1.0'
gem 'watir-rails', '1.1.0'
group :development, :test do
gem 'byebug', '6.0.2'
gem 'web-console', '2.2.1'
gem 'spring', '1.3.6'
end
Terminal
$ bundle install
...
Installing ffi 1.9.10 with native extensions
...
Bundle complete! 14 Gemfile dependencies, 68 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
$ bundle show ffi
/Users/me/.rvm/gems/ruby-2.2.2/gems/ffi-1.9.10
$ rails c
Could not find ffi-1.9.10 in any of the sources
Run `bundle install` to install missing gems
I tried placing "gem 'ffi', '1.9.10'" in my Gemfile.
I tried removing my Gemfile.lock and repeating this process.
I tried bundle exec rails c.
I tried gem install ffi --version 1.0.11, which seems to be the dependency for childprocess-0.5.6.
None of these attempts make any difference. Any ideas?
I ran into this same error just now, solved with gem pristine --all
Ran into the same issue with
An error occurred while installing ffi (1.10.0), and Bundler cannot
continue.
Make sure that `gem install ffi -v '1.10.0' --source 'https://rubygems.org/'`
succeeds before bundling.
A bundle update followed by a bundle install solved it for me
I have the sqlite3 gem in my Gemfile. Running 'bundle install' works without errors. When running a dababase migration using Rake:
rake db:create_migration NAME=create_messages
I get the following error:
rake aborted!
LoadError: Could not load 'active_record/connection_adapters/sqlite_adapter'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql', 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile.
I even tried specifying sqlite3 with 1.3.3 and then with 1.3.4 versions in the Gemfile but that did not resolve the issue. Ruby version is 1.9.3
Following is from my environments.rb file:
configure :development do
set :database, 'sqlite:///dev.db'
set :show_exceptions, true
end
Following is from Gemfile:
source 'https://rubygems.org'
#ruby "1.9.3"
gem "sinatra"
gem "activerecord"
gem "sinatra-activerecord"
gem 'sinatra-flash'
gem 'sinatra-redirect-with-flash'
group :development do
gem 'sqlite3-ruby'
gem "tux"
end
I have also tried sqlite3 in place of sqlite3-ruby but that did not solve the issue.
Try this!
set :database, 'sqlite3:///dev.db'
This was resoved after upgrading to ruby v2.2.1 and updating all the gems again. I installed v2.2.1 via RVM.