2014-01-17 98 views
0

jruby的新功能。試圖運行jruby Bundler找不到兼容的版本json

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進行任何更改。

我的Gemfile(尚未自去年十月改變,用於工作):

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' 

感謝

+0

你能分享你的'Gemfile'嗎? – banzaiman

回答

0

這看起來像一個bundler issue。將Bundler更新到1.5.2並重試:

jruby -S gem install bundler 
+0

感謝您的回覆。 我將bundler升級到1.5.2,並刪除了Gemfile.lock。現在,運行「jruby -S bundle install」時出現以下異常: 從https://rubygems.org/.........獲取gem元數據 從https:// ruby​​gems獲取其他元數據。 org/.. 解決依賴關係...線程「JRubyWorker-2」中的異常org.jruby.exceptions.RaiseException :(結果)Bundler :: SafeCatch :: Internal :: Result \t at RUBY.throw(/ usr/local /Cellar/jruby/1.7.3/libexec/lib/ruby/gems/shared/gems/bundler-1.5.2/lib/bundler/safe_catch.rb:70) \t at ... – user3208490

+0

現在這很有趣。閱讀Bundler源代碼,看起來你已經碰到了一個沒有catch的'throw' ...你能重新運行它嗎?DEBUG = 1 jruby -S bundle install'並將整個堆棧跟蹤編輯到你的問題中? –

+0

謝謝你,阿什。日誌很長,所以我把它放在http://pastebin.com/FHUu7HBV – user3208490

相關問題