jruby Bundler找不到兼容版本的json

时间:2022-09-06 00:16:32

New to jruby. I am getting error when trying to run

新的jruby。我试图运行时遇到错误

jruby -S bundle exec rake assets:precompile

Bundler could not find compatible versions for gem "json":
  In snapshot (Gemfile.lock):
    json (1.8.1)

  In Gemfile:
    carrierwave (>= 0) ruby depends on
      json (>= 1.7) ruby

I have tried removing Gemfile.lock and run "jruby -S bundle install", did not help.

我试过删除Gemfile.lock并运行“jruby -S bundle install”,没有帮助。

I am using jruby 1.7.3 and ruby 1.8.7 on a Mac. I have successfully run precompile before and have not made any changes to the Gemfile.

我在Mac上使用jruby 1.7.3和ruby 1.8.7。我之前已经成功运行了预编译,并且没有对Gemfile进行任何更改。

My Gemfile (has not been changed since last Oct., used to work):

我的Gemfile(自去年10月以来一直没有改变,以前用过):

source 'https://rubygems.org'

gem 'rails', '3.2.13'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'activerecord-jdbcmysql-adapter'
gem 'jruby-openssl'
gem 'mini_magick'
gem 'carrierwave'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'bourbon'

  #gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  gem 'therubyrhino'

  gem 'uglifier', '>= 1.0.3'
end

gem 'uuidtools'
gem 'amazon-ses-mailer'
gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

Thanks

谢谢

1 个解决方案

#1


0  

This looks like a bundler issue. Update Bundler to 1.5.2 and trying again:

这看起来像捆绑问题。将Bundler更新为1.5.2并再次尝试:

jruby -S gem install bundler

#1


0  

This looks like a bundler issue. Update Bundler to 1.5.2 and trying again:

这看起来像捆绑问题。将Bundler更新为1.5.2并再次尝试:

jruby -S gem install bundler