我有一個在Ubuntu上創建的Rails應用程序。我想在Mac上運行它,但安裝包和運行rails s
後,我收到以下錯誤:JRuby無法運行的Rails應用程序
LoadError: load error: sqlite3/sqlite3_native -- java.lang.UnsatisfiedLinkError: failed to load shim library, error: dlopen(/Users/home/.rvm/rubies/jruby-1.7.4/lib/native/Darwin/libjruby-cext.dylib, 10): image not found require at org/jruby/RubyKernel.java:1054
(root) at /Users/home/.rvm/gems/jruby-1.7.4/gems/sqlite3-1.3.8/lib/sqlite3.rb:6 require at org/jruby/RubyKernel.java:1054 (root) at /Users/home/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:1 each at org/jruby/RubyArray.java:1617 require at /Users/home/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:72 each at org/jruby/RubyArray.java:1617 require at /Users/home/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:70 require at /Users/home/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59 require at /Users/home/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler.rb:132 require at org/jruby/RubyKernel.java:1054 (root) at /Users/home/workSpace/RubyOnRails/sample_app/config/application.rb:13 tap at org/jruby/RubyKernel.java:1860 (root) at /Users/home/.rvm/gems/jruby-1.7.4/gems/railties-3.2.8/lib/rails/commands.rb:1 require at org/jruby/RubyKernel.java:1054 (root) at script/rails:6
我的Gemfile:
source ' https://rubygems.org '
gem 'rails', '3.2.8'
gem 'sqlite3'
group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3' end
gem 'jquery-rails'
gem 'execjs'
group :test, :development do gem "rspec-rails", "~> 2.0" end
gem 'spork'
gem 'webrat'
gem 'heroku'
我使用jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_15-b03 [darwin-x86_64]
和的Rails 3.2 .8
你是否也在Ubuntu上使用JRuby? – Shepmaster
不,我沒有使用它! – aakpro