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
我尝试删除 Gemfile.lock 并运行"jruby -S 捆绑包安装",但没有帮助。
我在Mac上使用jruby 1.7.3和ruby 1.8.7。 我之前已成功运行预编译,并且没有对 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'
谢谢
这
看起来像是一个捆绑器问题。将捆绑程序更新到 1.5.2 并重试:
jruby -S gem install bundler