Question

I am setting up spec, autotest and spork on jruby-1.6.6, but I get the following exception raised. I didn't found much around google, need help

$ jruby -S autotest
(Not running features.  To run features in autotest, set AUTOFEATURE=true.)
loading autotest/rspec2
TypeError: can't convert Array into String
             join at org/jruby/RubyArray.java:1868
       initialize at /Users/larry/.rvm/rubies/jruby-1.6.6/lib/ruby/site_ruby/shared/ffi/ffi.rb:64
  attach_function at /Users/larry/.rvm/rubies/jruby-1.6.6/lib/ruby/site_ruby/shared/ffi/library.rb:154
             each at org/jruby/RubyArray.java:1614
  attach_function at /Users/larry/.rvm/rubies/jruby-1.6.6/lib/ruby/site_ruby/shared/ffi/library.rb:150
            Uname at /Users/larry/.rvm/gems/jruby-1.6.6@entercamp/gems/sys-uname-0.9.0/lib/unix/sys/uname.rb:43
              Sys at /Users/larry/.rvm/gems/jruby-1.6.6@entercamp/gems/sys-uname-0.9.0/lib/unix/sys/uname.rb:8
           (root) at /Users/larry/.rvm/gems/jruby-1.6.6@entercamp/gems/sys-uname-0.9.0/lib/unix/sys/uname.rb:6
          require at org/jruby/RubyKernel.java:1036
          require at /Users/larry/.rvm/gems/jruby-1.6.6@entercamp/gems/sys-uname-0.9.0/lib/unix/sys/uname.rb:36
           (root) at /Users/larry/.rvm/gems/jruby-1.6.6@entercamp/gems/autotest-fsevent-0.2.8/lib/autotest/fsevent.rb:3
          require at org/jruby/RubyKernel.java:1036
          require at /Users/larry/.rvm/gems/jruby-1.6.6@entercamp/gems/autotest-fsevent-0.2.8/lib/autotest/fsevent.rb:59
           (root) at /Users/larry/.autotest:1
             load at org/jruby/RubyKernel.java:1062
       initialize at /Users/larry/.autotest:315
             each at org/jruby/RubyArray.java:1614
       initialize at /Users/larry/.rvm/gems/jruby-1.6.6@entercamp/gems/ZenTest-4.6.2/lib/autotest.rb:314
       initialize at /Users/larry/.rvm/gems/jruby-1.6.6@entercamp/gems/rspec-core-2.8.0/lib/autotest/rspec2.rb:13
              run at /Users/larry/.rvm/gems/jruby-1.6.6@entercamp/gems/ZenTest-4.6.2/lib/autotest.rb:244
           (root) at /Users/larry/.rvm/gems/jruby-1.6.6@entercamp/gems/ZenTest-4.6.2/bin/autotest:6
             load at org/jruby/RubyKernel.java:1062
           (root) at /Users/larry/.rvm/gems/jruby-1.6.6@entercamp/bin/autotest:19

my gem file: source 'https://rubygems.org'

gem 'rails', '3.2.1'
# gem 'jruby-openssl'
gem 'json'
gem 'jquery-rails'
gem 'twitter-text'
gem "mongoid", "~> 2.4"
gem "bson_ext", "~> 1.5"
gem "mongoid-paperclip", :require => "mongoid_paperclip"
gem 'i18n-js'

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

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  gem "therubyrhino", "~> 1.73.1"

  gem 'uglifier', '>= 1.0.3'
end

group :development, :test do
  gem 'factory_girl_rails', '1.6.0' # use factories instead of fixtures
  gem 'faker', '1.0.1'              # easily create fake data for tests
  gem 'rspec-rails', '2.8.1'        # test framework
  gem 'cucumber-rails', '1.2.1'     # integration test framework
  gem 'simplecov', '0.5.4'          # test coverage report
  gem 'json_spec', '0.8.0'          # easier testing of JSON
  gem 'database_cleaner', '0.7.1'   # manage DB between tests
  gem 'mongoid-rspec', '1.4.4'      # rspec matchers for mongoid
  gem 'autotest'
  gem 'autotest-fsevent'
  gem 'spork', '~> 0.9.0.rc'
end

jvm version:

$ java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
Était-ce utile?

La solution 2

It is fixed when using jruby-1.6.7

Autres conseils

This issue was fixed as part of that bug report on the 1.6 branch, and on master.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top