Failing to run the project or run a rake task
hamidkhosravian opened this issue · 3 comments
hamidkhosravian commented
When I run this rake task:
java -jar app.war -S rake db:migrate
or anything else I get this error:
Bundler::LockfileError: You must use Bundler 2 or greater with this lockfile.
warn_for_outdated_bundler_version at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/lockfile_parser.rb:108
initialize at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/lockfile_parser.rb:95
initialize at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:84
to_definition at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/dsl.rb:218
evaluate at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/dsl.rb:13
build at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:35
definition at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler.rb:135
setup at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler.rb:101
<main> at <script>:11
ERROR: org.jruby.embed.EvalFailedException: (LockfileError) You must use Bundler 2 or greater with this lockfile.
My bundler version in Gemfile.lock is:
BUNDLED WITH
2.0.2
My JRuby is: JRuby 9.2.6.0 (2.5.3)
hamidkhosravian commented
I add this gem to my Gemfile, and this issue is fixed:
gem 'jruby-jars', '9.2.6.0'
abhaynahar commented
@hamidkhosravian I am having the same issue and your solution of adding gem 'jruby-jars', '9.2.6.0'
to gemfile did not resolve my issue.
hamidkhosravian commented
@abhaynahar my Gemfile is:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
# ruby '2.5.3'
ruby '~>2.5.3', engine: 'jruby', engine_version: '9.2.6.0'
gem 'jruby-jars', '9.2.6.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.3'
# Use jdbcpostgresql as the database for Active Record
gem 'activerecord-jdbcpostgresql-adapter'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
gem 'therubyrhino'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem "react_on_rails", "11.1.4"
gem "webpacker", "~> 3"
gem 'foreman'
gem 'rack-cors'
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'warbler'
end
group :development, :test do
gem 'shoulda-matchers'
gem 'rspec-rails', '~> 3.8'
gem 'factory_bot_rails'
gem 'faker'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'mini_racer', platforms: :ruby