0
我使用JRuby和需要得到一個寶石的特定版本:回報率束得到'= 1.0.3 Java的寶石
C:\>gem list activerecord-jdbcsqlite3-adapter --remote --all
*** REMOTE GEMS ***
activerecord-jdbcsqlite3-adapter (1.2.6, 1.2.5, 1.2.2.1, 1.2.2, 1.2.1, 1.2.0, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.3 java, 1.0.2 java, 1.0.1 java, 1.0.0 java, 0.9.7
java, 0.9.6 java, 0.9.5 java, 0.9.4 java, 0.9.3 java, 0.9.2, 0.9.1, 0.9.0.1, 0.9, 0.8.2, 0.8.1)
好了,我把這個的Gemfile:
gem 'activerecord-jdbcsqlite3-adapter', '=1.0.3 java'
但是捆綁並不認爲已瞭解:
C:\bundle install
c:/soft/jruby-1.6.8/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:81:in `parse': Illformed requirement ["=1.0.3 java"] (ArgumentError)
c:/soft/jruby-1.6.8/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:106:in `initialize'
org/jruby/RubyArray.java:2379:in `map!'
c:/soft/jruby-1.6.8/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:106:in `initialize'
c:/soft/jruby-1.6.8/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:44:in
`create'
c:/soft/jruby-1.6.8/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:50:in `initialize'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/dependency.rb:28:in `initialize'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/dsl.rb:72:in `gem'
C:/Users/IBM_ADMIN/test_jdbc_rails_sqlite/Gemfile:9:in `(eval)'
org/jruby/RubyKernel.java:2086:in `instance_eval'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/dsl.rb:32:in `eval_gemfile'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/dsl.rb:7:in `evaluate'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/definition.rb:18:in `build'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler.rb:144:in `definition'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/cli.rb:228:in `install'
org/jruby/RubyKernel.java:2105:in `send'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/vendor/thor/task.rb:27:in `run'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/vendor/thor.rb:275:in `dispatch'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/vendor/thor/base.rb:408:in `start'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/bin/bundle:14:in `(root)'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
c:/soft/jruby-1.6.8/lib/ruby/gems/1.8/gems/bundler-1.2.3/bin/bundle:14:in `(root)'
org/jruby/RubyKernel.java:1087:in `load'
c:\soft\jruby-1.6.8\bin\bundle:23:in `(root)'
There was an error in your Gemfile, and Bundler cannot continue.
我在做什麼錯?
你有沒有試過遺漏'java':'gem'activerecord-jdbcsqlite3-adapter','1.0.3'' – PinnyM 2013-02-08 14:07:18