我在 OS X Mountail Lion v10.8.3 上通过 RVM 安装了 ruby 1.9.3-p392。我曾经$ rails new tryrails
在名为 'tryrails' 的目录 'rails_projects' 中建立一个 rails 项目。但是,当我尝试$ rails server
在 tryrails 中使用时,我得到了这个:
/Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `require': dlopen(/Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392/gems/sqlite3-1.3.7/lib/sqlite3/sqlite3_native.bundle, 9): Library not loaded: /Users/kevinrankine/.rvm/opt/sqlite/lib/libsqlite3.0.8.6.dylib (LoadError)
Referenced from: /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392/gems/sqlite3-1.3.7/lib/sqlite3/sqlite3_native.bundle
Reason: image not found - /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392/gems/sqlite3-1.3.7/lib/sqlite3/sqlite3_native.bundle
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392/gems/sqlite3-1.3.7/lib/sqlite3.rb:2:in `<top (required)>'
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/kevinrankine/rails_projects/tryrails/config/application.rb:7:in `<top (required)>'
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Users/kevinrankine/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Gemfile 看起来像这样:
source 'https://rubygems.org'
gem 'rails', '3.2.13'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# 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'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
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'
我目前的宝石是:
actionmailer (3.2.13)
actionpack (3.2.13)
activemodel (3.2.13)
activerecord (3.2.13)
activeresource (3.2.13)
activesupport (3.2.13)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.0.4)
bundler (1.3.5)
coffee-rails (3.2.2, 3.2.1)
coffee-script (2.2.0)
coffee-script-source (1.6.2)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.2)
i18n (0.6.1)
io-console (0.3)
journey (1.0.4)
jquery-rails (2.2.1, 2.0.2)
json (1.7.7, 1.5.5)
mail (2.5.3)
mime-types (1.23)
minitest (2.5.1)
multi_json (1.7.2)
mysql2 (0.3.11)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.13)
railties (3.2.13)
rake (10.0.4, 0.9.2.2)
rdoc (3.12.2, 3.9.5)
rubygems-bundler (1.1.1)
rvm (1.11.3.7)
sass (3.2.8)
sass-rails (3.2.6, 3.2.3)
sprockets (2.2.2)
sqlite3 (1.3.7, 1.3.5)
thor (0.18.1)
tilt (1.3.7)
treetop (1.4.12)
tzinfo (0.3.37)
uglifier (2.0.1, 1.0.3)
关于如何解决这个问题的任何想法?我真的不知道我在做什么:(